Spaces:
Runtime error
Runtime error
ageraustine
commited on
Commit
•
e93179f
1
Parent(s):
846c860
Update app.py
Browse files
app.py
CHANGED
@@ -106,7 +106,10 @@ conversation_history = []
|
|
106 |
message = st.chat_message("assistant")
|
107 |
message.write("Good to see you. Please tell me your latest career")
|
108 |
|
109 |
-
|
|
|
|
|
|
|
110 |
user_input = st.text_input("Enter your Response")
|
111 |
|
112 |
if "chat_history" not in st.session_state:
|
@@ -120,9 +123,7 @@ if st.button("Send"):
|
|
120 |
st.session_state["chat_history"].append({"message": user_input, "role": "user"})
|
121 |
st.session_state["chat_history"].append({"message": outputs, "role": "bot"})
|
122 |
|
123 |
-
|
124 |
-
for message in st.session_state["chat_history"]:
|
125 |
-
st.chat_message(message["message"], key=message["message"])
|
126 |
|
127 |
# Allow the user to quit the chat
|
128 |
if st.button("Quit"):
|
|
|
106 |
message = st.chat_message("assistant")
|
107 |
message.write("Good to see you. Please tell me your latest career")
|
108 |
|
109 |
+
# Display chat history
|
110 |
+
for message in st.session_state["chat_history"]:
|
111 |
+
st.chat_message(message["message"], key=message["message"])
|
112 |
+
|
113 |
user_input = st.text_input("Enter your Response")
|
114 |
|
115 |
if "chat_history" not in st.session_state:
|
|
|
123 |
st.session_state["chat_history"].append({"message": user_input, "role": "user"})
|
124 |
st.session_state["chat_history"].append({"message": outputs, "role": "bot"})
|
125 |
|
126 |
+
|
|
|
|
|
127 |
|
128 |
# Allow the user to quit the chat
|
129 |
if st.button("Quit"):
|