Spaces:
Runtime error
Runtime error
Commit
路
027622d
1
Parent(s):
2bb5424
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,14 +17,20 @@ demo = gr.Blocks()
|
|
| 17 |
|
| 18 |
with demo:
|
| 19 |
gr.Markdown("Demo para la clase de Platzi sobre c贸mo usar los Blocks de Gradio.")
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
-
b1.click(audio_a_texto, inputs=audio, outputs=
|
| 28 |
b2.click(texto_a_sentimiento, inputs=texto, outputs=label)
|
| 29 |
|
| 30 |
demo.launch()
|
|
|
|
| 17 |
|
| 18 |
with demo:
|
| 19 |
gr.Markdown("Demo para la clase de Platzi sobre c贸mo usar los Blocks de Gradio.")
|
| 20 |
+
with gr.Tabs():
|
| 21 |
+
with gr.TabItem("Transcribe audio en espa帽ol"):
|
| 22 |
+
with gr.Row():
|
| 23 |
+
audio = gr.Audio(source="microphone", type="filepath")
|
| 24 |
+
transcripcion = gr.Textbox()
|
| 25 |
+
b1 = gr.Button("Transcribe porfa")
|
| 26 |
+
|
| 27 |
+
with gr.TabItem("An谩lisis de sentimiento en espa帽ol"):
|
| 28 |
+
with gr.Row():
|
| 29 |
+
texto = gr.Textbox()
|
| 30 |
+
label = gr.Label()
|
| 31 |
+
b2 = gr.Button("Sentimiento porfa")
|
| 32 |
|
| 33 |
+
b1.click(audio_a_texto, inputs=audio, outputs=transcripcion)
|
| 34 |
b2.click(texto_a_sentimiento, inputs=texto, outputs=label)
|
| 35 |
|
| 36 |
demo.launch()
|