Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -93,10 +93,12 @@ demo = gr.Blocks()
|
|
93 |
mf_transcribe = gr.Interface(
|
94 |
fn=transcribe,
|
95 |
inputs=[
|
96 |
-
gr.Audio(
|
97 |
-
gr.Radio(["transcribe", "translate"], label="Task",
|
98 |
],
|
99 |
outputs="text",
|
|
|
|
|
100 |
title="Whisper Uzbek: Transcribe Audio",
|
101 |
description=(
|
102 |
"Transcribe long-form microphone or audio inputs with the click of a button! Demo uses the OpenAI Whisper"
|
@@ -109,10 +111,12 @@ mf_transcribe = gr.Interface(
|
|
109 |
file_transcribe = gr.Interface(
|
110 |
fn=transcribe,
|
111 |
inputs=[
|
112 |
-
gr.Audio(
|
113 |
-
gr.Radio(["transcribe", "translate"], label="Task",
|
114 |
],
|
115 |
outputs="text",
|
|
|
|
|
116 |
title="Whisper Uzbek: Transcribe Audio",
|
117 |
description=(
|
118 |
"Transcribe long-form microphone or audio inputs with the click of a button! Demo uses the OpenAI Whisper"
|
@@ -125,10 +129,12 @@ file_transcribe = gr.Interface(
|
|
125 |
yt_transcribe = gr.Interface(
|
126 |
fn=yt_transcribe,
|
127 |
inputs=[
|
128 |
-
gr.Textbox(lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL"),
|
129 |
-
gr.Radio(["transcribe", "translate"], label="Task",
|
130 |
],
|
131 |
outputs=["html", "text"],
|
|
|
|
|
132 |
title="Whisper Uzbek: Transcribe YouTube",
|
133 |
description=(
|
134 |
"Transcribe long-form YouTube videos with the click of a button! Demo uses the OpenAI Whisper checkpoint"
|
@@ -141,5 +147,5 @@ yt_transcribe = gr.Interface(
|
|
141 |
with demo:
|
142 |
gr.TabbedInterface([mf_transcribe, file_transcribe, yt_transcribe], ["Microphone", "Audio file", "YouTube"])
|
143 |
|
144 |
-
demo.launch()
|
145 |
|
|
|
93 |
mf_transcribe = gr.Interface(
|
94 |
fn=transcribe,
|
95 |
inputs=[
|
96 |
+
gr.inputs.Audio(source="microphone", type="filepath", optional=True),
|
97 |
+
gr.inputs.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
|
98 |
],
|
99 |
outputs="text",
|
100 |
+
layout="horizontal",
|
101 |
+
theme="huggingface",
|
102 |
title="Whisper Uzbek: Transcribe Audio",
|
103 |
description=(
|
104 |
"Transcribe long-form microphone or audio inputs with the click of a button! Demo uses the OpenAI Whisper"
|
|
|
111 |
file_transcribe = gr.Interface(
|
112 |
fn=transcribe,
|
113 |
inputs=[
|
114 |
+
gr.inputs.Audio(source="upload", type="filepath", optional=True, label="Audio file"),
|
115 |
+
gr.inputs.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
|
116 |
],
|
117 |
outputs="text",
|
118 |
+
layout="horizontal",
|
119 |
+
theme="huggingface",
|
120 |
title="Whisper Uzbek: Transcribe Audio",
|
121 |
description=(
|
122 |
"Transcribe long-form microphone or audio inputs with the click of a button! Demo uses the OpenAI Whisper"
|
|
|
129 |
yt_transcribe = gr.Interface(
|
130 |
fn=yt_transcribe,
|
131 |
inputs=[
|
132 |
+
gr.inputs.Textbox(lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL"),
|
133 |
+
gr.inputs.Radio(["transcribe", "translate"], label="Task", default="transcribe")
|
134 |
],
|
135 |
outputs=["html", "text"],
|
136 |
+
layout="horizontal",
|
137 |
+
theme="huggingface",
|
138 |
title="Whisper Uzbek: Transcribe YouTube",
|
139 |
description=(
|
140 |
"Transcribe long-form YouTube videos with the click of a button! Demo uses the OpenAI Whisper checkpoint"
|
|
|
147 |
with demo:
|
148 |
gr.TabbedInterface([mf_transcribe, file_transcribe, yt_transcribe], ["Microphone", "Audio file", "YouTube"])
|
149 |
|
150 |
+
demo.launch(enable_queue=True)
|
151 |
|