rickxzo commited on
Commit
c18d584
·
verified ·
1 Parent(s): 2ac525f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -8,7 +8,11 @@ pipe = pipeline("sentiment-analysis", model="rickxzo/review-sentiment-analysis",
8
  st.title("Sentiment Analysis with Transformer Model")
9
  text = st.text_area("Enter some text:")
10
 
 
 
 
 
11
  # Perform sentiment analysis when text is provided
12
  if text:
13
  out = pipe(text)
14
- st.json(out[0])
 
8
  st.title("Sentiment Analysis with Transformer Model")
9
  text = st.text_area("Enter some text:")
10
 
11
+ sentiment={
12
+ "LABEL_2":"Positive",
13
+ "LABEL_1":"Negative",
14
+ }
15
  # Perform sentiment analysis when text is provided
16
  if text:
17
  out = pipe(text)
18
+ st.json(sentiment[out[0]["label"]])