anuragshas commited on
Commit
f567bbf
·
1 Parent(s): c144338

update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -8
app.py CHANGED
@@ -61,34 +61,30 @@ demo = gr.Blocks()
61
  mf_transcribe = gr.Interface(
62
  fn=transcribe,
63
  inputs=[
64
- gr.Audio(sources="microphone", type="filepath", optional=True),
65
- gr.Audio(sources="upload", type="filepath", optional=True),
66
  ],
67
  outputs="text",
68
- layout="horizontal",
69
- theme="huggingface",
70
  title="Whisper Demo: Transcribe Audio",
71
  description=(
72
  "Transcribe long-form microphone or audio inputs with the click of a button! Demo uses the the fine-tuned"
73
  f" checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗 Transformers to transcribe audio files"
74
  " of arbitrary length."
75
  ),
76
- allow_flagging="never",
77
  )
78
 
79
  yt_transcribe = gr.Interface(
80
  fn=yt_transcribe,
81
  inputs=[gr.Textbox(lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL")],
82
  outputs=["html", "text"],
83
- layout="horizontal",
84
- theme="huggingface",
85
  title="Whisper Demo: Transcribe YouTube",
86
  description=(
87
  "Transcribe long-form YouTube videos with the click of a button! Demo uses the the fine-tuned checkpoint:"
88
  f" [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗 Transformers to transcribe audio files of"
89
  " arbitrary length."
90
  ),
91
- allow_flagging="never",
92
  )
93
 
94
  with demo:
 
61
  mf_transcribe = gr.Interface(
62
  fn=transcribe,
63
  inputs=[
64
+ gr.Audio(sources="microphone", type="filepath"),
65
+ gr.Audio(sources="upload", type="filepath"),
66
  ],
67
  outputs="text",
 
 
68
  title="Whisper Demo: Transcribe Audio",
69
  description=(
70
  "Transcribe long-form microphone or audio inputs with the click of a button! Demo uses the the fine-tuned"
71
  f" checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗 Transformers to transcribe audio files"
72
  " of arbitrary length."
73
  ),
74
+ flagging_mode="never",
75
  )
76
 
77
  yt_transcribe = gr.Interface(
78
  fn=yt_transcribe,
79
  inputs=[gr.Textbox(lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL")],
80
  outputs=["html", "text"],
 
 
81
  title="Whisper Demo: Transcribe YouTube",
82
  description=(
83
  "Transcribe long-form YouTube videos with the click of a button! Demo uses the the fine-tuned checkpoint:"
84
  f" [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗 Transformers to transcribe audio files of"
85
  " arbitrary length."
86
  ),
87
+ flagging_mode="never",
88
  )
89
 
90
  with demo: