Ryleeeee commited on
Commit
4cd5c70
·
verified ·
1 Parent(s): e51da38

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -42,10 +42,10 @@ if st.button("Classify Sentiment"):
42
  else:
43
  # Perform sentiment analysis on the input text
44
  sentiment_result = sentiment_class(review)
45
- st.write("This review sentiment is ", sentiment_result[1])
46
- st.write("Prediction score is ", sentiment_result[0])
47
 
48
  # Perform text summarization when the review sentiment is classified as negative
49
  if sentiment_result[1] == 'negative':
50
  category = product_dic[int(product_category(review)["label"].split("_")[1])]
51
- st.write("Category of the faulty product is ", category)
 
42
  else:
43
  # Perform sentiment analysis on the input text
44
  sentiment_result = sentiment_class(review)
45
+ st.write("Review sentiment: ", sentiment_result[1])
46
+ st.write("Prediction score: ", sentiment_result[0])
47
 
48
  # Perform text summarization when the review sentiment is classified as negative
49
  if sentiment_result[1] == 'negative':
50
  category = product_dic[int(product_category(review)["label"].split("_")[1])]
51
+ st.write("Category of the faulty product: ", category)