Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ def audio_to_text(audio):
|
|
9 |
return text
|
10 |
|
11 |
def text_to_sentiment(text):
|
12 |
-
return classifier(text)[0]["label"]
|
13 |
|
14 |
demo = gr.Blocks()
|
15 |
|
@@ -25,7 +25,7 @@ with demo:
|
|
25 |
with gr.TabItem("Análisis de sentimientos de textos en español"):
|
26 |
with gr.Row():
|
27 |
texto = gr.Textbox()
|
28 |
-
label = gr.Label(num_top_classes=
|
29 |
b2 = gr.Button("Sentimiento")
|
30 |
|
31 |
#b1.click(audio_to_text, inputs=audio, outputs=transcription)
|
|
|
9 |
return text
|
10 |
|
11 |
def text_to_sentiment(text):
|
12 |
+
return classifier(text)[0]#["label"]
|
13 |
|
14 |
demo = gr.Blocks()
|
15 |
|
|
|
25 |
with gr.TabItem("Análisis de sentimientos de textos en español"):
|
26 |
with gr.Row():
|
27 |
texto = gr.Textbox()
|
28 |
+
label = gr.Label(num_top_classes=1)
|
29 |
b2 = gr.Button("Sentimiento")
|
30 |
|
31 |
#b1.click(audio_to_text, inputs=audio, outputs=transcription)
|