Spaces:
Running
Running
Commit
·
1e5868e
1
Parent(s):
57c7ba9
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,3 @@
|
|
1 |
-
import os
|
2 |
-
os.system("pip install --upgrade httpx")
|
3 |
-
os.system("pip install --upgrade httpcore")
|
4 |
-
os.system("pip install --upgrade gradio")
|
5 |
import gradio as gr
|
6 |
import whisper
|
7 |
|
@@ -23,14 +19,12 @@ def inference(audio):
|
|
23 |
css = "footer {visibility: hidden}"
|
24 |
|
25 |
with gr.Blocks(css=css) as block:
|
26 |
-
gr.HTML("""<div style="text-align: center; max-width: 650px; margin: 0 auto;">
|
27 |
-
<div style="display: inline-flex; align-items: center; gap: 0.8rem; font-size: 1.75rem;">
|
28 |
-
<h1 style="font-weight: 900; margin-bottom: 7px;"></h1></div></div>""")
|
29 |
-
|
30 |
with gr.Row():
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
34 |
|
35 |
btn.click(inference, inputs=[audio], outputs=[text])
|
36 |
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import whisper
|
3 |
|
|
|
19 |
css = "footer {visibility: hidden}"
|
20 |
|
21 |
with gr.Blocks(css=css) as block:
|
|
|
|
|
|
|
|
|
22 |
with gr.Row():
|
23 |
+
with gr.Column():
|
24 |
+
audio = gr.Audio(label="Input Audio", type="filepath")
|
25 |
+
with gr.Column():
|
26 |
+
text = gr.Textbox(show_label=False)
|
27 |
+
btn = gr.Button("Transcribir")
|
28 |
|
29 |
btn.click(inference, inputs=[audio], outputs=[text])
|
30 |
|