You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Refactor the `create_upload_file` function to use `async` and `await`
- Read the contents of the uploaded file asynchronously using `await file.read()`
- Open the image using `PIL.Image.open` and convert it to RGB
- Generate the caption using `BlipInterrogator.generate_caption`
- Return the caption as a JSON response
This commit adds async handling for file uploads in the `app.py` file.
0 commit comments