Spaces:
Runtime error
Runtime error
ageraustine
commited on
Commit
•
27feb48
1
Parent(s):
9ebeab8
Update app.py
Browse files
app.py
CHANGED
@@ -103,8 +103,11 @@ st.title("LangChain Chat")
|
|
103 |
|
104 |
conversation_history = []
|
105 |
|
|
|
|
|
|
|
106 |
while True:
|
107 |
-
user_input = st.chat_input("
|
108 |
|
109 |
if st.button("Send"):
|
110 |
if user_input:
|
@@ -116,8 +119,10 @@ while True:
|
|
116 |
for key, value in outputs:
|
117 |
if key == "Output from node 'info':":
|
118 |
conversation_history.append(("Bot", value))
|
|
|
119 |
elif key == "Output from node 'profile':":
|
120 |
conversation_history.append(("Bot", value))
|
|
|
121 |
|
122 |
# Allow the user to quit the chat
|
123 |
if st.button("Quit"):
|
|
|
103 |
|
104 |
conversation_history = []
|
105 |
|
106 |
+
message = st.chat_message("assistant")
|
107 |
+
message.write("Good to see you. Please tell me your latest career")
|
108 |
+
|
109 |
while True:
|
110 |
+
user_input = st.chat_input("Enter your Response")
|
111 |
|
112 |
if st.button("Send"):
|
113 |
if user_input:
|
|
|
119 |
for key, value in outputs:
|
120 |
if key == "Output from node 'info':":
|
121 |
conversation_history.append(("Bot", value))
|
122 |
+
message.write(value)
|
123 |
elif key == "Output from node 'profile':":
|
124 |
conversation_history.append(("Bot", value))
|
125 |
+
message.write(value)
|
126 |
|
127 |
# Allow the user to quit the chat
|
128 |
if st.button("Quit"):
|