GenaroRocha commited on
Commit
012c291
1 Parent(s): 48400b1
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -30,14 +30,15 @@ with gr.Blocks() as demo:
30
  with gr.Row():
31
  with gr.Column():
32
  input_review = gr.Textbox(lines=2, placeholder="Ingrese una reseña de Amazon Fashion aquí...")
33
- label, score = gr.outputs.Label(), gr.outputs.Textbox()
34
- submit_button = gr.Button("Analizar")
 
35
  with gr.Column():
36
- sample_button = gr.Button("Mostrar Ejemplos")
37
- sample_df = gr.Dataframe()
38
 
39
- submit_button.click(analyze_sentiment, inputs=input_review, outputs=[label, score])
40
- sample_button.click(show_sample, inputs=None, outputs=sample_df)
41
 
42
  # Lanza la interfaz
43
  if __name__ == "__main__":
 
30
  with gr.Row():
31
  with gr.Column():
32
  input_review = gr.Textbox(lines=2, placeholder="Ingrese una reseña de Amazon Fashion aquí...")
33
+ analyze_button = gr.Button("Analizar")
34
+ output_label = gr.Label()
35
+ output_score = gr.Textbox()
36
  with gr.Column():
37
+ show_button = gr.Button("Mostrar Ejemplos")
38
+ output_df = gr.Dataframe()
39
 
40
+ analyze_button.click(analyze_sentiment, inputs=input_review, outputs=[output_label, output_score])
41
+ show_button.click(show_sample, inputs=None, outputs=output_df)
42
 
43
  # Lanza la interfaz
44
  if __name__ == "__main__":