Spaces:
Runtime error
Runtime error
Download app.py from EugenioRoma/Multiclassifier: direct link, hf CLI and curl.
- Browser
- Download file 998 Bytes
-
https://huggingface.co/spaces/EugenioRoma/Multiclassifier/resolve/main/app.py
- Command line
-
hf download hf://spaces/EugenioRoma/Multiclassifier/app.py
-
curl -L -o app.py https://huggingface.co/spaces/EugenioRoma/Multiclassifier/resolve/main/app.py
998 Bytes
| import gradio as gr | |
| from functions import audio_a_text, texto_a_sentimiento, classify_imagen | |
| demo = gr.Blocks() | |
| with demo: | |
| gr.Markdown("Este es el segundo demo con Blocks") | |
| with gr.Tabs(): | |
| with gr.TabItem("Transcribe audio en español"): | |
| with gr.Row(): | |
| audio = gr.Audio(source="microphone", type="filepath") | |
| transcripcion = gr.Textbox() | |
| b1 = gr.Button("Transcribir") | |
| with gr.TabItem("Análisis de sentimiento en español"): | |
| with gr.Row(): | |
| texto = gr.Textbox() | |
| label = gr.Label() | |
| b2 = gr.Button("Clasificar sentimiento") | |
| with gr.TabItem("Clasificación de imagen"): | |
| with gr.Row(): | |
| image = gr.Image(shape=(224,224)) | |
| label2 = gr.Label(num_top_classes=3) | |
| b3 = gr.Button("Clasificar imagen") | |
| b1.click(audio_a_text, inputs = audio, outputs=transcripcion) | |
| b2.click(texto_a_sentimiento, inputs=texto, outputs=label) | |
| b3.click(classify_imagen, inputs=image, outputs=label2) | |
| demo.launch() | |