Upload flask_kosmos2.py

#3
by JGKaaij - opened

Added requested comments.

I wasn't sure how to update the existing Pull Request living here: https://huggingface.co/ydshieh/kosmos-2-patch14-224/discussions/2
I closed it and made a new one.

No problem. Thanks again, I will take a look.

You're welcome and also thank you for your work. If you have any requests for changes or questions just let me know.

Hi @JGKaaij After a second thought, I think it makes more sense to put this in a section of the README file toward the end. WDYT?

Yeah, I fully agree. I did see comments in your code at parts but it's more a description of the code itself - not instructions. I have added it to the Readme.md file on my side. I also added some further functionality to the flask_kosmos2.py to format the entities dictionary in a proper JSON reply. I also have a requirements.txt file with most of the proper packages. I tried to look for a way to change this pull request with the additional files but I can't find a way, I'm pretty new to Huggingface - more familiar with Git Hub. Do you know of a way? Or should I just create a new pull request again (it scatters the whole discussion, which I dislike).

You can check https://huggingface.co/docs/hub/repositories-pull-requests-discussions#how-do-i-manage-pull-requests-locally you should allow you to push the local changes to the PR.

Let's just put the content of the flask_kosmos2.py in the README file, toward the end. Not other file, please. Thank you.

Sure - whatever suits you. You could consider an example folder for these kinds of things as well. Anyways. I made another pull request (didn't have time to check out your link): https://huggingface.co/ydshieh/kosmos-2-patch14-224/discussions/5

Merged another PR. Thanks again. Close this one.

ydshieh changed pull request status to closed

Sign up or log in to comment