marquesafonso commited on
Commit
e058aa0
·
1 Parent(s): fc138bd

fix indent alignment

Browse files
Files changed (1) hide show
  1. app.py +18 -18
app.py CHANGED
@@ -25,24 +25,24 @@ def main():
25
  allow_flagging="never"
26
  )
27
  with gr.Tab("Audio", id = "audio"):
28
- video = False
29
- file = gr.File(file_types=["audio"],type="filepath", label="Upload an audio file")
30
- file_type = gr.Radio(choices=["audio"], value="audio", label="File Type", visible=False)
31
- max_words_per_line = gr.Number(value=6, label="Max words per line")
32
- task = gr.Radio(choices=["transcribe", "translate"], value="transcribe", label="Select Task")
33
- model_version = gr.Radio(choices=["deepdml/faster-whisper-large-v3-turbo-ct2",
34
- "turbo",
35
- "large-v3"], value="deepdml/faster-whisper-large-v3-turbo-ct2", label="Select Model")
36
- text_output = gr.Textbox(label="SRT Text transcription")
37
- srt_file = gr.File(value=None, file_count="single", type="filepath", file_types=[".srt"], label="SRT file")
38
- text_clean_output = gr.Textbox(label="Text transcription")
39
- gr.Interface(
40
- fn=transcriber,
41
- inputs=[file, file_type, max_words_per_line, task, model_version],
42
- outputs=[text_output, srt_file, text_clean_output],
43
- allow_flagging="never"
44
- )
45
- demo.launch()
46
 
47
  if __name__ == '__main__':
48
  main()
 
25
  allow_flagging="never"
26
  )
27
  with gr.Tab("Audio", id = "audio"):
28
+ video = False
29
+ file = gr.File(file_types=["audio"],type="filepath", label="Upload an audio file")
30
+ file_type = gr.Radio(choices=["audio"], value="audio", label="File Type", visible=False)
31
+ max_words_per_line = gr.Number(value=6, label="Max words per line")
32
+ task = gr.Radio(choices=["transcribe", "translate"], value="transcribe", label="Select Task")
33
+ model_version = gr.Radio(choices=["deepdml/faster-whisper-large-v3-turbo-ct2",
34
+ "turbo",
35
+ "large-v3"], value="deepdml/faster-whisper-large-v3-turbo-ct2", label="Select Model")
36
+ text_output = gr.Textbox(label="SRT Text transcription")
37
+ srt_file = gr.File(value=None, file_count="single", type="filepath", file_types=[".srt"], label="SRT file")
38
+ text_clean_output = gr.Textbox(label="Text transcription")
39
+ gr.Interface(
40
+ fn=transcriber,
41
+ inputs=[file, file_type, max_words_per_line, task, model_version],
42
+ outputs=[text_output, srt_file, text_clean_output],
43
+ allow_flagging="never"
44
+ )
45
+ demo.launch()
46
 
47
  if __name__ == '__main__':
48
  main()