Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -515,13 +515,21 @@ with gr.Blocks(title="Multilingual Sentiment Analysis") as demo:
|
|
| 515 |
gr.Markdown("")
|
| 516 |
|
| 517 |
# Event handlers
|
|
|
|
|
|
|
|
|
|
|
|
|
| 518 |
btn_analyze.click(
|
| 519 |
analyze_sentiment_complete,
|
| 520 |
inputs=[user_text, lang_dropdown],
|
| 521 |
outputs=[out_sent, out_conf, out_exp, out_file, out_strong]
|
| 522 |
)
|
| 523 |
-
|
| 524 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 525 |
|
| 526 |
if __name__ == "__main__":
|
| 527 |
demo.launch(share=False)
|
|
|
|
| 515 |
gr.Markdown("")
|
| 516 |
|
| 517 |
# Event handlers
|
| 518 |
+
out_exp = gr.Textbox(label="💡 Detailed Explanation")
|
| 519 |
+
out_strong = gr.Textbox(label="🔥 Strong Sentiment Words")
|
| 520 |
+
out_file = gr.File(label="📁 Log File")
|
| 521 |
+
|
| 522 |
btn_analyze.click(
|
| 523 |
analyze_sentiment_complete,
|
| 524 |
inputs=[user_text, lang_dropdown],
|
| 525 |
outputs=[out_sent, out_conf, out_exp, out_file, out_strong]
|
| 526 |
)
|
| 527 |
+
|
| 528 |
+
btn_show.click(show_logs, outputs=[gr.Dataframe()])
|
| 529 |
+
btn_clear.click(clear_logs, outputs=[gr.Dataframe()])
|
| 530 |
+
|
| 531 |
+
demo.launch()
|
| 532 |
+
|
| 533 |
|
| 534 |
if __name__ == "__main__":
|
| 535 |
demo.launch(share=False)
|