Make upload_video call asynchronous in make_slideshow function
Browse files
main.py
CHANGED
@@ -215,7 +215,7 @@ async def make_slideshow(request: SlideshowRequest):
|
|
215 |
# Return URL to the video
|
216 |
base_url = "https://saq1b-api.hf.space/static"
|
217 |
video_url = f"{base_url}/{request_id}/slideshow.mp4"
|
218 |
-
uploaded_video_url = upload_video(video_url)
|
219 |
return {"url": uploaded_video_url}
|
220 |
|
221 |
except Exception as e:
|
|
|
215 |
# Return URL to the video
|
216 |
base_url = "https://saq1b-api.hf.space/static"
|
217 |
video_url = f"{base_url}/{request_id}/slideshow.mp4"
|
218 |
+
uploaded_video_url = await upload_video(video_url)
|
219 |
return {"url": uploaded_video_url}
|
220 |
|
221 |
except Exception as e:
|