Hasitha16 commited on
Commit
3a342ac
Β·
verified Β·
1 Parent(s): 4c953d3

Update frontend.py

Browse files
Files changed (1) hide show
  1. frontend.py +4 -1
frontend.py CHANGED
@@ -69,12 +69,15 @@ with tab1:
69
  st.markdown("Analyze feedback to detect churn risk, extract pain points, and support product decisions.")
70
 
71
  review = st.text_area("πŸ“ Enter Customer Feedback", value=st.session_state.review, height=180)
 
 
 
72
  st.session_state.review = review
73
 
74
  analyze = False
75
  col1, col2, col3 = st.columns(3)
76
  with col1:
77
- analyze = st.button("πŸ” Analyze")
78
  with col2:
79
  if st.button("🎲 Example"):
80
  st.session_state.review = (
 
69
  st.markdown("Analyze feedback to detect churn risk, extract pain points, and support product decisions.")
70
 
71
  review = st.text_area("πŸ“ Enter Customer Feedback", value=st.session_state.review, height=180)
72
+ if review and (len(review.split()) < 20 or len(review.split()) > 50):
73
+ st.warning("⚠️ For best results, keep the review between 20 to 50 words.")
74
+
75
  st.session_state.review = review
76
 
77
  analyze = False
78
  col1, col2, col3 = st.columns(3)
79
  with col1:
80
+ analyze = st.button("πŸ” Analyze", disabled=not (20 <= len(review.split()) <= 50))
81
  with col2:
82
  if st.button("🎲 Example"):
83
  st.session_state.review = (