Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -152,9 +152,9 @@ def generate_sfx(video_path):
|
|
| 152 |
# Clean Llama responses (your logic, made more robust)
|
| 153 |
prompts = response_text.splitlines()
|
| 154 |
fixed_prompts = [p for p in prompts if p and "(" in p] # Keep only valid, non-empty lines with a separator
|
| 155 |
-
|
| 156 |
if not fixed_prompts:
|
| 157 |
-
return transcript,
|
| 158 |
|
| 159 |
# --- Step 3: ElevenLabs Audio Generation ---
|
| 160 |
output_audio_files = []
|
|
|
|
| 152 |
# Clean Llama responses (your logic, made more robust)
|
| 153 |
prompts = response_text.splitlines()
|
| 154 |
fixed_prompts = [p for p in prompts if p and "(" in p] # Keep only valid, non-empty lines with a separator
|
| 155 |
+
# Llama did not return any valid prompts. []
|
| 156 |
if not fixed_prompts:
|
| 157 |
+
return transcript, prompts, fixed_prompts
|
| 158 |
|
| 159 |
# --- Step 3: ElevenLabs Audio Generation ---
|
| 160 |
output_audio_files = []
|