Update app.py
Browse files
app.py
CHANGED
|
@@ -79,8 +79,11 @@ with gr.Blocks(theme=gr.themes.Monochrome(), css=css) as demo:
|
|
| 79 |
if not video_file.name.lower().endswith(('.mp4', '.mkv', '.avi')):
|
| 80 |
return None, "β Invalid file type. Please upload an MP4, MKV, or AVI file."
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
# Process video
|
| 83 |
-
progress_text.update(value="π Processing video...")
|
| 84 |
srt_path = process_video(video_file.name, language)
|
| 85 |
if srt_path:
|
| 86 |
return gr.File(srt_path), "β
Subtitles generated successfully!"
|
|
|
|
| 79 |
if not video_file.name.lower().endswith(('.mp4', '.mkv', '.avi')):
|
| 80 |
return None, "β Invalid file type. Please upload an MP4, MKV, or AVI file."
|
| 81 |
|
| 82 |
+
# Update progress text
|
| 83 |
+
progress = "π Processing video..."
|
| 84 |
+
yield None, progress # Yield initial progress message
|
| 85 |
+
|
| 86 |
# Process video
|
|
|
|
| 87 |
srt_path = process_video(video_file.name, language)
|
| 88 |
if srt_path:
|
| 89 |
return gr.File(srt_path), "β
Subtitles generated successfully!"
|