Spaces:
Sleeping
Sleeping
Update app.py
Browse filesdownload link for the subtitled video
app.py
CHANGED
@@ -146,7 +146,8 @@ def download_video():
|
|
146 |
output_video_path = "subtitled_video.mp4"
|
147 |
subtitled_video.write_videofile(output_video_path)
|
148 |
|
149 |
-
|
|
|
150 |
|
151 |
except Exception as e:
|
152 |
return f"Error in generating subtitled video: {e}"
|
@@ -189,7 +190,7 @@ with gr.Blocks() as demo:
|
|
189 |
# Download Subtitled Video
|
190 |
with gr.Row():
|
191 |
download_video_button = gr.Button("Download Subtitled Video")
|
192 |
-
download_video_status = gr.
|
193 |
|
194 |
download_video_button.click(download_video, inputs=None, outputs=download_video_status)
|
195 |
|
|
|
146 |
output_video_path = "subtitled_video.mp4"
|
147 |
subtitled_video.write_videofile(output_video_path)
|
148 |
|
149 |
+
# Return the file path for download
|
150 |
+
return output_video_path
|
151 |
|
152 |
except Exception as e:
|
153 |
return f"Error in generating subtitled video: {e}"
|
|
|
190 |
# Download Subtitled Video
|
191 |
with gr.Row():
|
192 |
download_video_button = gr.Button("Download Subtitled Video")
|
193 |
+
download_video_status = gr.File(label="Download Subtitled Video") # File output for Video download
|
194 |
|
195 |
download_video_button.click(download_video, inputs=None, outputs=download_video_status)
|
196 |
|