marquesafonso commited on
Commit
66ab005
·
1 Parent(s): ae52f76

use gradio json component

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -16,10 +16,10 @@ def main():
16
  model_version = gr.Radio(choices=["deepdml/faster-whisper-large-v3-turbo-ct2",
17
  "turbo",
18
  "large-v3"], value="deepdml/faster-whisper-large-v3-turbo-ct2", label="Select Model")
19
- text_output = gr.Textbox(label="SRT Text transcription")
20
  srt_file = gr.File(file_count="single", type="filepath", file_types=[".srt"], label="SRT file")
21
- text_clean_output = gr.Textbox(label="Text transcription")
22
- json_output = gr.Textbox(label="JSON Transcription")
23
  gr.Interface(
24
  fn=transcriber,
25
  inputs=[file, file_type, max_words_per_line, task, model_version],
@@ -35,10 +35,10 @@ def main():
35
  model_version = gr.Radio(choices=["deepdml/faster-whisper-large-v3-turbo-ct2",
36
  "turbo",
37
  "large-v3"], value="deepdml/faster-whisper-large-v3-turbo-ct2", label="Select Model")
38
- text_output = gr.Textbox(label="SRT Text transcription")
39
  srt_file = gr.File(file_count="single", type="filepath", file_types=[".srt"], label="SRT file")
40
- text_clean_output = gr.Textbox(label="Text transcription")
41
- json_output = gr.Textbox(label="JSON Transcription")
42
  gr.Interface(
43
  fn=transcriber,
44
  inputs=[file, file_type, max_words_per_line, task, model_version],
 
16
  model_version = gr.Radio(choices=["deepdml/faster-whisper-large-v3-turbo-ct2",
17
  "turbo",
18
  "large-v3"], value="deepdml/faster-whisper-large-v3-turbo-ct2", label="Select Model")
19
+ text_output = gr.Textbox(label="SRT Text transcription", show_copy_button=True)
20
  srt_file = gr.File(file_count="single", type="filepath", file_types=[".srt"], label="SRT file")
21
+ text_clean_output = gr.Textbox(label="Text transcription", show_copy_button=True)
22
+ json_output = gr.JSON(label="JSON Transcription")
23
  gr.Interface(
24
  fn=transcriber,
25
  inputs=[file, file_type, max_words_per_line, task, model_version],
 
35
  model_version = gr.Radio(choices=["deepdml/faster-whisper-large-v3-turbo-ct2",
36
  "turbo",
37
  "large-v3"], value="deepdml/faster-whisper-large-v3-turbo-ct2", label="Select Model")
38
+ text_output = gr.Textbox(label="SRT Text transcription", show_copy_button=True)
39
  srt_file = gr.File(file_count="single", type="filepath", file_types=[".srt"], label="SRT file")
40
+ text_clean_output = gr.Textbox(label="Text transcription", show_copy_button=True)
41
+ json_output = gr.JSON(label="JSON Transcription")
42
  gr.Interface(
43
  fn=transcriber,
44
  inputs=[file, file_type, max_words_per_line, task, model_version],