Sasidhar commited on
Commit
c50246f
1 Parent(s): ebd8105

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -46,19 +46,22 @@ st.header("Review Analyzer")
46
  #if action == "Analyse a Review":
47
  st.subheader("Paste/write a review here..")
48
  review = st.text_area("")
 
 
 
49
 
50
  if review:
51
  #res = text_generator( prompt, max_length=100, temperature=0.7)
52
  #st.write(res)
53
- if st.button("Get the Sentiment of the Review"):
54
  sentiment = get_sentiment(review)
55
  st.write(sentiment)
56
 
57
- if st.button("Summarize the review"):
58
  summary = summarizer(review, max_length=130, min_length=30, do_sample=False)
59
  st.write(summary)
60
 
61
- if st.button("Find the key topic"):
62
  QA_input = {'question': 'what is the review about?',
63
  'context': review}
64
  answer = answer_generator(QA_input)
 
46
  #if action == "Analyse a Review":
47
  st.subheader("Paste/write a review here..")
48
  review = st.text_area("")
49
+ start_sentiment_analysis = st.button("Get the Sentiment of the Review")
50
+ start_summarizing = st.button("Summarize the review")
51
+ start_topic_extraction = st.button("Find the key topic")
52
 
53
  if review:
54
  #res = text_generator( prompt, max_length=100, temperature=0.7)
55
  #st.write(res)
56
+ if start_sentiment_analysis:
57
  sentiment = get_sentiment(review)
58
  st.write(sentiment)
59
 
60
+ if start_summarizing:
61
  summary = summarizer(review, max_length=130, min_length=30, do_sample=False)
62
  st.write(summary)
63
 
64
+ if start_topic_extraction:
65
  QA_input = {'question': 'what is the review about?',
66
  'context': review}
67
  answer = answer_generator(QA_input)