Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -307,7 +307,7 @@ class ProductSelector:
|
|
307 |
for key in keys_to_delete:
|
308 |
del st.session_state[key]
|
309 |
st.session_state.welcome_msg = "What product would you like me to analyze next?"
|
310 |
-
st.
|
311 |
|
312 |
if choice == "None of the above" or msg == "product not found because product information in the db is corrupt":
|
313 |
st.session_state.messages.append(
|
@@ -330,7 +330,7 @@ class ProductSelector:
|
|
330 |
with st.chat_message("assistant"):
|
331 |
st.markdown(f"{len(uploaded_files)} images uploaded for analysis.")
|
332 |
st.session_state.uploaded_files = uploaded_files
|
333 |
-
st.
|
334 |
|
335 |
# Prevent further chat input while awaiting selection
|
336 |
return True # Indicates selection is in progress
|
@@ -470,7 +470,7 @@ def main():
|
|
470 |
|
471 |
#else:
|
472 |
# print(f"DEBUG : st.session_state.awaiting_selection : {st.session_state.awaiting_selection}")
|
473 |
-
st.
|
474 |
else:
|
475 |
# Disable chat input while selection is in progress
|
476 |
st.chat_input("Please confirm your selection above first...", disabled=True)
|
@@ -478,7 +478,7 @@ def main():
|
|
478 |
# Clear chat history button
|
479 |
if st.button("Clear Chat History"):
|
480 |
st.session_state.clear()
|
481 |
-
st.
|
482 |
|
483 |
# Call the wrapper function in Streamlit
|
484 |
if __name__ == "__main__":
|
|
|
307 |
for key in keys_to_delete:
|
308 |
del st.session_state[key]
|
309 |
st.session_state.welcome_msg = "What product would you like me to analyze next?"
|
310 |
+
st.experimental_rerun()
|
311 |
|
312 |
if choice == "None of the above" or msg == "product not found because product information in the db is corrupt":
|
313 |
st.session_state.messages.append(
|
|
|
330 |
with st.chat_message("assistant"):
|
331 |
st.markdown(f"{len(uploaded_files)} images uploaded for analysis.")
|
332 |
st.session_state.uploaded_files = uploaded_files
|
333 |
+
st.experimental_rerun()
|
334 |
|
335 |
# Prevent further chat input while awaiting selection
|
336 |
return True # Indicates selection is in progress
|
|
|
470 |
|
471 |
#else:
|
472 |
# print(f"DEBUG : st.session_state.awaiting_selection : {st.session_state.awaiting_selection}")
|
473 |
+
st.experimental_rerun()
|
474 |
else:
|
475 |
# Disable chat input while selection is in progress
|
476 |
st.chat_input("Please confirm your selection above first...", disabled=True)
|
|
|
478 |
# Clear chat history button
|
479 |
if st.button("Clear Chat History"):
|
480 |
st.session_state.clear()
|
481 |
+
st.experimental_rerun()
|
482 |
|
483 |
# Call the wrapper function in Streamlit
|
484 |
if __name__ == "__main__":
|