aguyader commited on
Commit
803754f
·
verified ·
1 Parent(s): 557e797

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -31,4 +31,10 @@ if user_input:
31
  # Append the interaction to chat history
32
  st.session_state["messages"].append((user_input, bot_response))
33
  # Clear input box
34
- st.experimental_rerun()
 
 
 
 
 
 
 
31
  # Append the interaction to chat history
32
  st.session_state["messages"].append((user_input, bot_response))
33
  # Clear input box
34
+ st.session_state["user_input"] = ""
35
+
36
+ # Display chat history
37
+ st.markdown("### Chat History")
38
+ for user, bot in st.session_state["messages"]:
39
+ st.markdown(f"**You:** {user}")
40
+ st.markdown(f"**Bot:** {bot}")