Ryleeeee commited on
Commit
2ee8849
·
verified ·
1 Parent(s): e93d87a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -8,8 +8,7 @@ sentiment_classifier = pipeline("text-classification",model='Ryleeeee/CustomSent
8
  summarizer = pipeline("summarization", model="MurkatG/review-summarizer-en")
9
 
10
  # Streamlit application title and background image
11
- # st.image("./header.png", width=300, use_column_width=False)
12
- st.markdown("<div style='text-align:center'><img src='./header.png' width='300'></div>", unsafe_allow_html=True)
13
  st.markdown("<h1 style='text-align: center;'>Customer Review Analysis</h1>", unsafe_allow_html=True)
14
 
15
  st.write("Setiment classification: positive, netural, negative")
@@ -43,5 +42,9 @@ if st.button("Classify Sentiment"):
43
  st.write("This review sentiment is ", sentiment_result[1])
44
  st.write("Prediction score is ", sentiment_result[0])
45
 
46
- if sentiment_result[1] == 'negative':
47
- st.button("Summarize Review")
 
 
 
 
 
8
  summarizer = pipeline("summarization", model="MurkatG/review-summarizer-en")
9
 
10
  # Streamlit application title and background image
11
+ st.image("./header.png", use_column_width=False)
 
12
  st.markdown("<h1 style='text-align: center;'>Customer Review Analysis</h1>", unsafe_allow_html=True)
13
 
14
  st.write("Setiment classification: positive, netural, negative")
 
42
  st.write("This review sentiment is ", sentiment_result[1])
43
  st.write("Prediction score is ", sentiment_result[0])
44
 
45
+ if sentiment_result[1] == 'negative':
46
+ st.button("Summarize Review")
47
+ if st.button("Summarize Review"):
48
+ summary = summarize_text(review)
49
+ st.write("Review summary: ", summary)
50
+