Commit
·
5be3bc1
1
Parent(s):
3c50cc6
make file_type radio invisible
Browse files
app.py
CHANGED
|
@@ -7,9 +7,8 @@ def main():
|
|
| 7 |
gr.Markdown('An automatic speech recognition tool using [faster-whisper](https://github.com/SYSTRAN/faster-whisper). Supports multilingual video transcription and translation to english. Users may set the max words per line.')
|
| 8 |
with gr.Tabs(selected="video") as tabs:
|
| 9 |
with gr.Tab("Video", id="video"):
|
| 10 |
-
video = True
|
| 11 |
file = gr.File(file_types=["video"],type="filepath", label="Upload a video")
|
| 12 |
-
file_type = gr.Radio(choices=["video"], value="video", label="File Type")
|
| 13 |
max_words_per_line = gr.Number(value=6, label="Max words per line")
|
| 14 |
task = gr.Radio(choices=["transcribe", "translate"], value="transcribe", label="Select Task")
|
| 15 |
model_version = gr.Radio(choices=["deepdml/faster-whisper-large-v3-turbo-ct2",
|
|
@@ -24,9 +23,8 @@ def main():
|
|
| 24 |
allow_flagging="never")
|
| 25 |
|
| 26 |
with gr.Tab("Audio", id = "audio"):
|
| 27 |
-
video = False
|
| 28 |
file = gr.File(file_types=["audio"],type="filepath", label="Upload an audio file")
|
| 29 |
-
file_type = gr.Radio(choices=["audio"], value="audio", label="File Type")
|
| 30 |
max_words_per_line = gr.Number(value=6, label="Max words per line")
|
| 31 |
task = gr.Radio(choices=["transcribe", "translate"], value="transcribe", label="Select Task")
|
| 32 |
model_version = gr.Radio(choices=["deepdml/faster-whisper-large-v3-turbo-ct2",
|
|
|
|
| 7 |
gr.Markdown('An automatic speech recognition tool using [faster-whisper](https://github.com/SYSTRAN/faster-whisper). Supports multilingual video transcription and translation to english. Users may set the max words per line.')
|
| 8 |
with gr.Tabs(selected="video") as tabs:
|
| 9 |
with gr.Tab("Video", id="video"):
|
|
|
|
| 10 |
file = gr.File(file_types=["video"],type="filepath", label="Upload a video")
|
| 11 |
+
file_type = gr.Radio(choices=["video"], value="video", label="File Type", visible=False)
|
| 12 |
max_words_per_line = gr.Number(value=6, label="Max words per line")
|
| 13 |
task = gr.Radio(choices=["transcribe", "translate"], value="transcribe", label="Select Task")
|
| 14 |
model_version = gr.Radio(choices=["deepdml/faster-whisper-large-v3-turbo-ct2",
|
|
|
|
| 23 |
allow_flagging="never")
|
| 24 |
|
| 25 |
with gr.Tab("Audio", id = "audio"):
|
|
|
|
| 26 |
file = gr.File(file_types=["audio"],type="filepath", label="Upload an audio file")
|
| 27 |
+
file_type = gr.Radio(choices=["audio"], value="audio", label="File Type", visible=False)
|
| 28 |
max_words_per_line = gr.Number(value=6, label="Max words per line")
|
| 29 |
task = gr.Radio(choices=["transcribe", "translate"], value="transcribe", label="Select Task")
|
| 30 |
model_version = gr.Radio(choices=["deepdml/faster-whisper-large-v3-turbo-ct2",
|