Spaces:
Build error
Build error
Update app.py
Browse files
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
|
| 174 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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():
|