Upload app.py
Browse files
app.py
CHANGED
|
@@ -267,17 +267,15 @@ def create_interface():
|
|
| 267 |
<p>Models: Text-to-Video • Text-to-Speech • Enhanced VHS effects</p>
|
| 268 |
</div>
|
| 269 |
""")
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
return "Back to '87 - the future is now!"
|
| 280 |
-
|
| 281 |
@spaces.GPU(timeout=120) # 2 minute timeout for ZeroGPU
|
| 282 |
def generate_commercial(
|
| 283 |
brand_name: str,
|
|
|
|
| 267 |
<p>Models: Text-to-Video • Text-to-Speech • Enhanced VHS effects</p>
|
| 268 |
</div>
|
| 269 |
""")
|
| 270 |
+
def roll_script_suggestion(structure_text: str, seed_val: int) -> str:
|
| 271 |
+
"""Generate script suggestions using LLM."""
|
| 272 |
+
try:
|
| 273 |
+
suggestions = script_generator.suggest_scripts(structure_text, n=1, seed=seed_val)
|
| 274 |
+
return suggestions[0] if suggestions else "Back to '87 - the future is now!"
|
| 275 |
+
except Exception as e:
|
| 276 |
+
logger.error(f"Script suggestion failed: {e}")
|
| 277 |
+
return "Back to '87 - the future is now!"
|
| 278 |
+
|
|
|
|
|
|
|
| 279 |
@spaces.GPU(timeout=120) # 2 minute timeout for ZeroGPU
|
| 280 |
def generate_commercial(
|
| 281 |
brand_name: str,
|