Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ def run_video_ocr(input_video, output_file_name, language_code, use_gpu, start_t
|
|
15 |
|
16 |
# Save the subtitles to file
|
17 |
save_subtitles_to_file(
|
18 |
-
input_video
|
19 |
output_path, # Output .srt file path
|
20 |
lang=language_code,
|
21 |
use_gpu=use_gpu,
|
@@ -38,7 +38,7 @@ def run_video_ocr(input_video, output_file_name, language_code, use_gpu, start_t
|
|
38 |
def video_ocr_interface():
|
39 |
with gr.Blocks() as demo:
|
40 |
with gr.Row():
|
41 |
-
input_video = gr.File(label="Upload Video", type="
|
42 |
output_file_name = gr.Textbox(label="Output File Name (.srt)", value="subtitle.srt")
|
43 |
language_code = gr.Textbox(label="Language Code", value="ch")
|
44 |
use_gpu = gr.Checkbox(label="Use GPU", value=True)
|
|
|
15 |
|
16 |
# Save the subtitles to file
|
17 |
save_subtitles_to_file(
|
18 |
+
input_video, # The uploaded video file path
|
19 |
output_path, # Output .srt file path
|
20 |
lang=language_code,
|
21 |
use_gpu=use_gpu,
|
|
|
38 |
def video_ocr_interface():
|
39 |
with gr.Blocks() as demo:
|
40 |
with gr.Row():
|
41 |
+
input_video = gr.File(label="Upload Video", type="filepath") # Changed to 'filepath'
|
42 |
output_file_name = gr.Textbox(label="Output File Name (.srt)", value="subtitle.srt")
|
43 |
language_code = gr.Textbox(label="Language Code", value="ch")
|
44 |
use_gpu = gr.Checkbox(label="Use GPU", value=True)
|