Skip to content

Commit

Permalink
update gradio version (sanchit-gandhi#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchit-gandhi authored Dec 15, 2023
1 parent 9c50a6e commit 1b3096a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
34 changes: 17 additions & 17 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,13 @@ def transcribe_youtube(yt_url, task, return_timestamps, progress=gr.Progress()):
microphone_chunked = gr.Interface(
fn=transcribe_chunked_audio,
inputs=[
gr.inputs.Audio(source="microphone", optional=True, type="filepath"),
gr.inputs.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
gr.inputs.Checkbox(default=False, label="Return timestamps"),
gr.Audio(sources=["microphone"], type="filepath"),
gr.Radio(["transcribe", "translate"], label="Task", value="transcribe"),
gr.Checkbox(value=False, label="Return timestamps"),
],
outputs=[
gr.outputs.Textbox(label="Transcription").style(show_copy_button=True),
gr.outputs.Textbox(label="Transcription Time (s)"),
gr.Textbox(label="Transcription", show_copy_button=True),
gr.Textbox(label="Transcription Time (s)"),
],
allow_flagging="never",
title=title,
Expand All @@ -224,13 +224,13 @@ def transcribe_youtube(yt_url, task, return_timestamps, progress=gr.Progress()):
audio_chunked = gr.Interface(
fn=transcribe_chunked_audio,
inputs=[
gr.inputs.Audio(source="upload", optional=True, label="Audio file", type="filepath"),
gr.inputs.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
gr.inputs.Checkbox(default=False, label="Return timestamps"),
gr.Audio(sources=["upload"], label="Audio file", type="filepath"),
gr.Radio(["transcribe", "translate"], label="Task", value="transcribe"),
gr.Checkbox(value=False, label="Return timestamps"),
],
outputs=[
gr.outputs.Textbox(label="Transcription").style(show_copy_button=True),
gr.outputs.Textbox(label="Transcription Time (s)"),
gr.Textbox(label="Transcription", show_copy_button=True),
gr.Textbox(label="Transcription Time (s)"),
],
allow_flagging="never",
title=title,
Expand All @@ -241,14 +241,14 @@ def transcribe_youtube(yt_url, task, return_timestamps, progress=gr.Progress()):
youtube = gr.Interface(
fn=transcribe_youtube,
inputs=[
gr.inputs.Textbox(lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL"),
gr.inputs.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
gr.inputs.Checkbox(default=False, label="Return timestamps"),
gr.Textbox(lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL"),
gr.Radio(["transcribe", "translate"], label="Task", value="transcribe"),
gr.Checkbox(value=False, label="Return timestamps"),
],
outputs=[
gr.outputs.HTML(label="Video"),
gr.outputs.Textbox(label="Transcription").style(show_copy_button=True),
gr.outputs.Textbox(label="Transcription Time (s)"),
gr.HTML(label="Video"),
gr.Textbox(label="Transcription", show_copy_button=True),
gr.Textbox(label="Transcription Time (s)"),
],
allow_flagging="never",
title=title,
Expand All @@ -263,5 +263,5 @@ def transcribe_youtube(yt_url, task, return_timestamps, progress=gr.Progress()):
with demo:
gr.TabbedInterface([microphone_chunked, audio_chunked, youtube], ["Microphone", "Audio File", "YouTube"])

demo.queue(concurrency_count=1, max_size=5)
demo.queue(max_size=5)
demo.launch(server_name="0.0.0.0", show_api=False)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
]

_extras_endpoint_deps = [
"gradio>=3.25.0",
"gradio>=4.9.1",
"requests>=2.28.2",
"yt-dlp>=2023.3.4",
]
Expand Down

0 comments on commit 1b3096a

Please sign in to comment.