Coder Social home page Coder Social logo

Comments (6)

henryj18 avatar henryj18 commented on August 16, 2024

Depending on the existing code, we may need to add weaviate query directly into memeGeneration/handler.py, or use the query results from memeMatching/handler.py

from memeai.

henryj18 avatar henryj18 commented on August 16, 2024

I think the following code:
curPath = os.getcwd()
image = Image.open(curPath + '/memeGeneration/query-result-image-0.png')

Probably should be replaced by something like:
image = Image.open(generateMemeImageRequest.MemeImage)

from memeai.

henryj18 avatar henryj18 commented on August 16, 2024

Refer to the following in appBackend/handler.py
GenerateTextForMemeRequest(
MemeImage= matchTextToMemeResponse.Memes[0],
InputText=generateTextForMemeRequest.InputText,
)

My understanding is that we do not need to add weaviate query inside "memeGeneration/handler.py" since the query results are embeded inside the parameter passed into generate_meme_image(generateTextForMemeRequest), and the weaviate query results are generated by the memeMatching/handler.py

We just need to use the result with the following statements:

image = Image.open(generateMemeImageRequest.MemeImage)

and

text = generateMemeImageRequest.MemeText (note: this one already exists)

from memeai.

Teravolt avatar Teravolt commented on August 16, 2024

@henryj18 I have a fix for it. See the following branch: https://github.com/aiswaryasankar/memeAI/tree/feature/generate-meme-image

from memeai.

henryj18 avatar henryj18 commented on August 16, 2024

@Teravolt , thanks for the update. Yeah, I can see that the implemention is in line with the proposed solution, and it also adds details to encode and/or decode the "generateMemeImageRequest.MemeImage" into image data before calling Image.open, with that logic defined in the function construt_pil_img(). Let's look forward to testing out the solution when the whole system is up running.

from memeai.

henryj18 avatar henryj18 commented on August 16, 2024

@Teravolt Also, I suggest some reference to this issue #11 is placed into the comment box of the branch of the fix, this is for purpose of future tracking, it helps to document why the changes

from memeai.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.