Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -545,10 +545,12 @@ async def run_tts_pipeline(task_id: str, story: StoryCreationDTO):
|
|
| 545 |
file_name = f"{uuid.uuid4()}_{os.path.basename(final_generated_story_path)}"
|
| 546 |
storage_path = f"{story.storyId}/final/{file_name}"
|
| 547 |
|
| 548 |
-
|
|
|
|
|
|
|
| 549 |
supabase.storage.from("story-audio-files").upload(
|
| 550 |
storage_path,
|
| 551 |
-
|
| 552 |
)
|
| 553 |
|
| 554 |
# 6️⃣ Get public URL
|
|
|
|
| 545 |
file_name = f"{uuid.uuid4()}_{os.path.basename(final_generated_story_path)}"
|
| 546 |
storage_path = f"{story.storyId}/final/{file_name}"
|
| 547 |
|
| 548 |
+
with open(final_generated_storypath, "rb") as f:
|
| 549 |
+
file_bytes = f.read()
|
| 550 |
+
|
| 551 |
supabase.storage.from("story-audio-files").upload(
|
| 552 |
storage_path,
|
| 553 |
+
file_bytes
|
| 554 |
)
|
| 555 |
|
| 556 |
# 6️⃣ Get public URL
|