mrgmd01 commited on
Commit
21a70c6
Β·
verified Β·
1 Parent(s): 0f459d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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 + Emoji")
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],