Update make_slideshow to upload generated video and return the uploaded URL
Browse files
main.py
CHANGED
|
@@ -215,7 +215,8 @@ 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 |
-
|
|
|
|
| 219 |
|
| 220 |
except Exception as e:
|
| 221 |
# Clean up on error
|
|
|
|
| 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:
|
| 222 |
# Clean up on error
|