add logging
Browse files
app.py
CHANGED
|
@@ -570,7 +570,8 @@ def mcp_agent_pipeline(niche, style, num_variations=3, add_voice=True):
|
|
| 570 |
created_videos.append(creation_result["output_path"])
|
| 571 |
status_log.append(f" ✅ Variation {i+1} created!")
|
| 572 |
else:
|
| 573 |
-
|
|
|
|
| 574 |
|
| 575 |
if not created_videos:
|
| 576 |
status_log.append("\n❌ All video creations failed")
|
|
@@ -667,6 +668,9 @@ def fallback_pipeline(niche, style, num_variations=3, add_voice=True):
|
|
| 667 |
|
| 668 |
if creation_result["success"]:
|
| 669 |
created_videos.append(creation_result["output_path"])
|
|
|
|
|
|
|
|
|
|
| 670 |
|
| 671 |
if not created_videos:
|
| 672 |
return "\n".join(status_log) + "\n❌ Video creation failed", video_results[0]["video_url"] if video_results else None, []
|
|
@@ -789,4 +793,3 @@ with gr.Blocks(title="AIQuoteClipGenerator - MCP Edition", theme=gr.themes.Soft(
|
|
| 789 |
|
| 790 |
if __name__ == "__main__":
|
| 791 |
demo.launch()
|
| 792 |
-
|
|
|
|
| 570 |
created_videos.append(creation_result["output_path"])
|
| 571 |
status_log.append(f" ✅ Variation {i+1} created!")
|
| 572 |
else:
|
| 573 |
+
error_msg = creation_result.get("message", "Unknown error")
|
| 574 |
+
status_log.append(f" ⚠️ Variation {i+1} failed: {error_msg}")
|
| 575 |
|
| 576 |
if not created_videos:
|
| 577 |
status_log.append("\n❌ All video creations failed")
|
|
|
|
| 668 |
|
| 669 |
if creation_result["success"]:
|
| 670 |
created_videos.append(creation_result["output_path"])
|
| 671 |
+
else:
|
| 672 |
+
error_msg = creation_result.get("message", "Unknown error")
|
| 673 |
+
status_log.append(f" ❌ Video {i+1} error: {error_msg}")
|
| 674 |
|
| 675 |
if not created_videos:
|
| 676 |
return "\n".join(status_log) + "\n❌ Video creation failed", video_results[0]["video_url"] if video_results else None, []
|
|
|
|
| 793 |
|
| 794 |
if __name__ == "__main__":
|
| 795 |
demo.launch()
|
|
|