Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import time
|
|
| 5 |
import os
|
| 6 |
|
| 7 |
# Replace with your Modal URL from deployment
|
| 8 |
-
MODAL_URL = "https://
|
| 9 |
|
| 10 |
def process_video(video_file, language="hindi", subtitle_position="bottom-center", progress=gr.Progress()):
|
| 11 |
"""
|
|
@@ -72,7 +72,11 @@ def process_video(video_file, language="hindi", subtitle_position="bottom-center
|
|
| 72 |
|
| 73 |
progress(1.0, desc="Complete!")
|
| 74 |
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
except requests.Timeout:
|
| 78 |
return None, None, "Error: Processing timed out after 10 minutes. Try a shorter video."
|
|
|
|
| 5 |
import os
|
| 6 |
|
| 7 |
# Replace with your Modal URL from deployment
|
| 8 |
+
MODAL_URL = "https://YOUR-USERNAME--subtitle-generator-process-video.modal.run"
|
| 9 |
|
| 10 |
def process_video(video_file, language="hindi", subtitle_position="bottom-center", progress=gr.Progress()):
|
| 11 |
"""
|
|
|
|
| 72 |
|
| 73 |
progress(1.0, desc="Complete!")
|
| 74 |
|
| 75 |
+
status_message = result["status"]
|
| 76 |
+
if "transcription" in result:
|
| 77 |
+
status_message += f"\n\n**Full Transcription:**\n{result['transcription']}"
|
| 78 |
+
|
| 79 |
+
return srt_output_path, video_output_path, status_message
|
| 80 |
|
| 81 |
except requests.Timeout:
|
| 82 |
return None, None, "Error: Processing timed out after 10 minutes. Try a shorter video."
|