Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,15 +19,15 @@ def classify_img(im):
|
|
19 |
labels = {v["label"]: v["score"] for v in ans}
|
20 |
return labels
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
# Este '
|
26 |
- Voice2Text: [Wav2Vec2](https://huggingface.co/facebook/wav2vec2-large-xlsr-53-spanish)
|
27 |
- Sentiment Analysis: [Robertuito](https://huggingface.co/pysentimiento/robertuito-sentiment-analysis)
|
28 |
- Image Classifier: [Swin-small-patch4](https://huggingface.co/microsoft/swin-small-patch4-window7-224)
|
29 |
-
Autor del demo: [ΜΕΤΑΝΘΡΩΠΙΑ](https://www.instagram.com/metantropia.jpg)
|
30 |
-
|
31 |
|
32 |
with gr.Tabs():
|
33 |
|
@@ -45,12 +45,12 @@ Autor del demo: [ΜΕΤΑΝΘΡΩΠΙΑ](https://www.instagram.com/metantropia.j
|
|
45 |
|
46 |
with gr.TabItem("Clasificación de Imágenes"):
|
47 |
with gr.Row():
|
48 |
-
image = gr.Image(label="Carga una
|
49 |
label_image = gr.Label(num_top_classes=5)
|
50 |
b3 = gr.Button("Clasifica")
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
|
56 |
demo.launch()
|
|
|
19 |
labels = {v["label"]: v["score"] for v in ans}
|
20 |
return labels
|
21 |
|
22 |
+
demo=gr.Blocks()
|
23 |
+
with demo:
|
24 |
+
gr.Markdown("""
|
25 |
+
# Este 'Space' permite la inferencia los siguientes modelos open-source:
|
26 |
- Voice2Text: [Wav2Vec2](https://huggingface.co/facebook/wav2vec2-large-xlsr-53-spanish)
|
27 |
- Sentiment Analysis: [Robertuito](https://huggingface.co/pysentimiento/robertuito-sentiment-analysis)
|
28 |
- Image Classifier: [Swin-small-patch4](https://huggingface.co/microsoft/swin-small-patch4-window7-224)
|
29 |
+
- Autor del demo: [ΜΕΤΑΝΘΡΩΠΙΑ](https://www.instagram.com/metantropia.jpg)
|
30 |
+
""")
|
31 |
|
32 |
with gr.Tabs():
|
33 |
|
|
|
45 |
|
46 |
with gr.TabItem("Clasificación de Imágenes"):
|
47 |
with gr.Row():
|
48 |
+
image = gr.Image(label="Carga una Imagen")
|
49 |
label_image = gr.Label(num_top_classes=5)
|
50 |
b3 = gr.Button("Clasifica")
|
51 |
|
52 |
+
b1.click(audio2text,inputs=audio,outputs=transcripcion)
|
53 |
+
b2.click(text2sentiment,inputs=text,outputs=label)
|
54 |
+
b3.click(classify_img, inputs=image, outputs=label_image)
|
55 |
|
56 |
demo.launch()
|