marquesafonso
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -8,12 +8,12 @@ def main():
|
|
8 |
video_file = gr.File(file_types=["video"],type="filepath", label="Upload a video")
|
9 |
max_words_per_line = gr.Number(value=6, label="Max words per line")
|
10 |
task = gr.Radio(choices=["transcribe", "translate"], value="transcribe", label="Select Task")
|
11 |
-
|
12 |
text_output = gr.Textbox(label="SRT Text transcription", show_copy_button=True)
|
13 |
srt_file = gr.File(file_count="single", type="filepath", file_types=[".srt"], label="SRT file")
|
14 |
text_clean_output = gr.Textbox(label="Text transcription", show_copy_button=True)
|
15 |
gr.Interface(transcriber,
|
16 |
-
inputs=[video_file, max_words_per_line, task],
|
17 |
outputs=[text_output, srt_file, text_clean_output],
|
18 |
allow_flagging="never")
|
19 |
demo.launch()
|
|
|
8 |
video_file = gr.File(file_types=["video"],type="filepath", label="Upload a video")
|
9 |
max_words_per_line = gr.Number(value=6, label="Max words per line")
|
10 |
task = gr.Radio(choices=["transcribe", "translate"], value="transcribe", label="Select Task")
|
11 |
+
model_version = gr.Radio(choices=["deepdml/faster-whisper-large-v3-turbo-ct2", "large-v3"], value="deepdml/faster-whisper-large-v3-turbo-ct2", label="Select Model")
|
12 |
text_output = gr.Textbox(label="SRT Text transcription", show_copy_button=True)
|
13 |
srt_file = gr.File(file_count="single", type="filepath", file_types=[".srt"], label="SRT file")
|
14 |
text_clean_output = gr.Textbox(label="Text transcription", show_copy_button=True)
|
15 |
gr.Interface(transcriber,
|
16 |
+
inputs=[video_file, max_words_per_line, task, model_version],
|
17 |
outputs=[text_output, srt_file, text_clean_output],
|
18 |
allow_flagging="never")
|
19 |
demo.launch()
|