Update app.py
Browse files
app.py
CHANGED
|
@@ -51,8 +51,8 @@ def normalize_label(label):
|
|
| 51 |
# Add emojis for polarity
|
| 52 |
def add_emoji(label):
|
| 53 |
mapping = {
|
| 54 |
-
"Positive": "
|
| 55 |
-
"Negative": "
|
| 56 |
"Neutral": "π"
|
| 57 |
}
|
| 58 |
return f"{label} {mapping.get(label, '')}"
|
|
@@ -101,7 +101,7 @@ with gr.Blocks() as demo:
|
|
| 101 |
|
| 102 |
out_sent = gr.Textbox(label="Sentiment")
|
| 103 |
out_conf = gr.Textbox(label="Confidence (0β1)")
|
| 104 |
-
out_pol = gr.Textbox(label="Polarity
|
| 105 |
out_file = gr.File(label="β¬οΈ Download Sentences (.csv)", type="filepath")
|
| 106 |
|
| 107 |
btn.click(analyze_single, inputs=[user_text, lang_dropdown],
|
|
|
|
| 51 |
# Add emojis for polarity
|
| 52 |
def add_emoji(label):
|
| 53 |
mapping = {
|
| 54 |
+
"Positive": "π",
|
| 55 |
+
"Negative": "π",
|
| 56 |
"Neutral": "π"
|
| 57 |
}
|
| 58 |
return f"{label} {mapping.get(label, '')}"
|
|
|
|
| 101 |
|
| 102 |
out_sent = gr.Textbox(label="Sentiment")
|
| 103 |
out_conf = gr.Textbox(label="Confidence (0β1)")
|
| 104 |
+
out_pol = gr.Textbox(label="Polarity")
|
| 105 |
out_file = gr.File(label="β¬οΈ Download Sentences (.csv)", type="filepath")
|
| 106 |
|
| 107 |
btn.click(analyze_single, inputs=[user_text, lang_dropdown],
|