sanjitaa commited on
Commit
97bf953
β€’
1 Parent(s): c188186

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -18
app.py CHANGED
@@ -51,24 +51,24 @@ def translate(inputs, task):
51
 
52
  demo = gr.Blocks()
53
 
54
- mf_transcribe = gr.Interface(
55
- fn=translate,
56
- inputs=[
57
- gr.inputs.Audio(source="microphone", type="filepath", optional=True),
58
- gr.inputs.Radio(["translate"], label="Task", default="translate"),
59
 
60
- ],
61
- outputs="text",
62
- layout="horizontal",
63
- theme="huggingface",
64
- title="Whisper Medium: Transcribe Audio",
65
- description=(
66
- "Transcribe long-form microphone or audio inputs with the click of a button! Demo uses the"
67
- f" checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and πŸ€— Transformers to transcribe audio files"
68
- " of arbitrary length."
69
- ),
70
- allow_flagging="never",
71
- )
72
 
73
  file_transcribe = gr.Interface(
74
  fn=translate,
@@ -90,7 +90,7 @@ file_transcribe = gr.Interface(
90
 
91
 
92
  with demo:
93
- gr.TabbedInterface([mf_transcribe, file_transcribe], ["Microphone", "Audio file"])
94
 
95
  demo.launch(enable_queue=True)
96
 
 
51
 
52
  demo = gr.Blocks()
53
 
54
+ # mf_transcribe = gr.Interface(
55
+ # fn=translate,
56
+ # inputs=[
57
+ # gr.inputs.Audio(source="microphone", type="filepath", optional=True),
58
+ # gr.inputs.Radio(["translate"], label="Task", default="translate"),
59
 
60
+ # ],
61
+ # outputs="text",
62
+ # layout="horizontal",
63
+ # theme="huggingface",
64
+ # title="Whisper Medium: Transcribe Audio",
65
+ # description=(
66
+ # "Transcribe long-form microphone or audio inputs with the click of a button! Demo uses the"
67
+ # f" checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and πŸ€— Transformers to transcribe audio files"
68
+ # " of arbitrary length."
69
+ # ),
70
+ # allow_flagging="never",
71
+ # )
72
 
73
  file_transcribe = gr.Interface(
74
  fn=translate,
 
90
 
91
 
92
  with demo:
93
+ gr.TabbedInterface([file_transcribe], ["Audio file"])
94
 
95
  demo.launch(enable_queue=True)
96