yangheng commited on
Commit
e098ae7
·
1 Parent(s): b5f55f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -47,7 +47,7 @@ def perform_inference(text, dataset):
47
  'position': result[0]['position']
48
  })
49
 
50
- return result, text
51
 
52
 
53
  demo = gr.Blocks()
@@ -72,12 +72,13 @@ with demo:
72
  gr.Markdown("This demo support many other language as well, you can try and explore the results of other languages by yourself.")
73
 
74
  with gr.Column():
 
75
  output_df = gr.DataFrame(label="Prediction Results:")
76
  output_dfs.append(output_df)
77
 
78
  inference_button.click(fn=perform_inference,
79
  inputs=[input_sentence, dataset_ids],
80
- outputs=[output_df, input_sentence])
81
 
82
  gr.Markdown("![visitor badge](https://visitor-badge.glitch.me/badge?page_id=https://huggingface.co/spaces/yangheng/Multilingual-Aspect-Based-Sentiment-Analysis)")
83
 
 
47
  'position': result[0]['position']
48
  })
49
 
50
+ return result, '{}'.format(dataset, text)
51
 
52
 
53
  demo = gr.Blocks()
 
72
  gr.Markdown("This demo support many other language as well, you can try and explore the results of other languages by yourself.")
73
 
74
  with gr.Column():
75
+ output_text = gr.TextArea(label="Example:")
76
  output_df = gr.DataFrame(label="Prediction Results:")
77
  output_dfs.append(output_df)
78
 
79
  inference_button.click(fn=perform_inference,
80
  inputs=[input_sentence, dataset_ids],
81
+ outputs=[output_df, output_text])
82
 
83
  gr.Markdown("![visitor badge](https://visitor-badge.glitch.me/badge?page_id=https://huggingface.co/spaces/yangheng/Multilingual-Aspect-Based-Sentiment-Analysis)")
84