sent2547 commited on
Commit
b89c124
·
verified ·
1 Parent(s): 6064619

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -1,18 +1,20 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- model_name = "ZombitX64/sentimentv2"
5
  nlp = pipeline("sentiment-analysis", model=model_name)
6
 
7
  label_map = {
8
  "LABEL_0": 0,
9
  "LABEL_1": 1,
10
- "LABEL_2": 2
 
11
  }
12
  label_name_map = {
13
- "LABEL_0": "negative",
14
- "LABEL_1": "neutral",
15
- "LABEL_2": "positive"
 
16
  }
17
 
18
  def analyze_text(text):
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ model_name = "ZombitX64/MultiSent-E5"
5
  nlp = pipeline("sentiment-analysis", model=model_name)
6
 
7
  label_map = {
8
  "LABEL_0": 0,
9
  "LABEL_1": 1,
10
+ "LABEL_2": 2,
11
+ "LABEL_3": 3
12
  }
13
  label_name_map = {
14
+ "LABEL_0": "question",
15
+ "LABEL_1": "negative",
16
+ "LABEL_2": "neutral",
17
+ "LABEL_3": "positive"
18
  }
19
 
20
  def analyze_text(text):