Spaces:
Running
Running
Update frontend.py
Browse files- 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 = (
|