Josedcape commited on
Commit
aadd067
verified
1 Parent(s): 8aa7f9b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -170,8 +170,15 @@ if page == "Chat Asistente":
170
  with st.chat_message("user"):
171
  st.image(imagen_bytes)
172
 
173
- # Limpiar el campo de texto despu茅s de enviar
174
- st.session_state['pregunta_input'] = ""
 
 
 
 
 
 
 
175
 
176
  with st.spinner("Generando respuesta..."):
177
  with st.empty():
 
170
  with st.chat_message("user"):
171
  st.image(imagen_bytes)
172
 
173
+ # Limpiar el campo de texto usando JavaScript para evitar el error de modificaci贸n del estado
174
+ st.markdown(
175
+ """
176
+ <script>
177
+ document.querySelector('input[type="text"]').value = "";
178
+ </script>
179
+ """,
180
+ unsafe_allow_html=True,
181
+ )
182
 
183
  with st.spinner("Generando respuesta..."):
184
  with st.empty():