jemole commited on
Commit
3678d5c
1 Parent(s): f0fd7e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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=3)
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)