Spaces:
Runtime error
Runtime error
Commit
·
6c48ea2
1
Parent(s):
f07e6a2
lang code update
Browse files
app.py
CHANGED
@@ -118,16 +118,15 @@ def yt_transcribe(yt_url, task, return_timestamps, language, max_filesize=75.0):
|
|
118 |
else:
|
119 |
return html_embed_str, result['text']
|
120 |
|
121 |
-
|
122 |
demo = gr.Blocks()
|
123 |
|
124 |
mf_transcribe = gr.Interface(
|
125 |
fn=transcribe,
|
126 |
inputs=[
|
127 |
-
gr.
|
128 |
-
gr.
|
129 |
-
gr.
|
130 |
-
gr.
|
131 |
],
|
132 |
outputs="text",
|
133 |
layout="horizontal",
|
@@ -143,10 +142,10 @@ mf_transcribe = gr.Interface(
|
|
143 |
file_transcribe = gr.Interface(
|
144 |
fn=transcribe,
|
145 |
inputs=[
|
146 |
-
gr.
|
147 |
-
gr.
|
148 |
-
gr.
|
149 |
-
gr.
|
150 |
],
|
151 |
outputs="text",
|
152 |
layout="horizontal",
|
@@ -162,10 +161,10 @@ file_transcribe = gr.Interface(
|
|
162 |
yt_transcribe = gr.Interface(
|
163 |
fn=yt_transcribe,
|
164 |
inputs=[
|
165 |
-
gr.
|
166 |
-
gr.
|
167 |
-
gr.
|
168 |
-
gr.
|
169 |
],
|
170 |
outputs=["html", "text"],
|
171 |
layout="horizontal",
|
|
|
118 |
else:
|
119 |
return html_embed_str, result['text']
|
120 |
|
|
|
121 |
demo = gr.Blocks()
|
122 |
|
123 |
mf_transcribe = gr.Interface(
|
124 |
fn=transcribe,
|
125 |
inputs=[
|
126 |
+
gr.Interface.Audio(source="microphone", type="filepath", optional=True),
|
127 |
+
gr.Interface.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
|
128 |
+
gr.Interface.Checkbox(label="Return timestamps"),
|
129 |
+
gr.Interface.Dropdown(choices=["English", "Uzbek"], label="Language"),
|
130 |
],
|
131 |
outputs="text",
|
132 |
layout="horizontal",
|
|
|
142 |
file_transcribe = gr.Interface(
|
143 |
fn=transcribe,
|
144 |
inputs=[
|
145 |
+
gr.Interface.Audio(source="upload", type="filepath", optional=True, label="Audio file"),
|
146 |
+
gr.Interface.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
|
147 |
+
gr.Interface.Checkbox(label="Return timestamps"),
|
148 |
+
gr.Interface.Dropdown(choices=["English", "Uzbek"], label="Language"),
|
149 |
],
|
150 |
outputs="text",
|
151 |
layout="horizontal",
|
|
|
161 |
yt_transcribe = gr.Interface(
|
162 |
fn=yt_transcribe,
|
163 |
inputs=[
|
164 |
+
gr.Interface.Textbox(lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL"),
|
165 |
+
gr.Interface.Radio(["transcribe", "translate"], label="Task", default="transcribe"),
|
166 |
+
gr.Interface.Checkbox(label="Return timestamps"),
|
167 |
+
gr.Interface.Dropdown(choices=["English", "Uzbek"], label="Language"),
|
168 |
],
|
169 |
outputs=["html", "text"],
|
170 |
layout="horizontal",
|