Adityaganesh commited on
Commit
95af976
·
verified ·
1 Parent(s): de65d4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -217,7 +217,9 @@ with col1:
217
  sentiment_display = f'{sentiment.capitalize()} {emojis.get(sentiment, "")}'
218
  st.markdown(f'<div class="radium-label">{sentiment_display}</div>', unsafe_allow_html=True)
219
 
 
 
220
  with col2:
221
  if st.markdown('<div class="radium-button">', unsafe_allow_html=True):
222
  if st.button("🧹 Clear"):
223
- st.rerun()
 
217
  sentiment_display = f'{sentiment.capitalize()} {emojis.get(sentiment, "")}'
218
  st.markdown(f'<div class="radium-label">{sentiment_display}</div>', unsafe_allow_html=True)
219
 
220
+
221
+ # Clear button with session state reset
222
  with col2:
223
  if st.markdown('<div class="radium-button">', unsafe_allow_html=True):
224
  if st.button("🧹 Clear"):
225
+ st.session_state.input_box = ""