jina-ai/examples

Refactoring code since context manager is not supported.

rudranshsharma123 opened this issue · 3 comments

I believe lines
This:

with Document(id=hashed) as document_caption:

and this:
with Document() as document_img:

needs to be changed since Jina does not support context manager anymore.
Because following the example yields this issue:
image
I believe that's the only thing that needs to be changed.

I believe these two lines only need change. If I am correct I would like to be the one to close and make my contribution to this project!

I think it's fixed and I did the workflow correctly. Feel free to correct me if I am wrong (I am still new to all this)