ageraustine commited on
Commit
5c301da
·
verified ·
1 Parent(s): 27feb48

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -21
app.py CHANGED
@@ -106,26 +106,26 @@ conversation_history = []
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:
114
- # Execute LangChain logic
115
- outputs = execute_langchain(user_input)
116
-
117
- # Update conversation history
118
- conversation_history.append(("You", 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"):
129
- st.text("Bot: Byebye")
130
- break
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
 
 
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.chat_input("Enter your Response")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
 
112
+ if st.button("Send"):
113
+ if user_input:
114
+ # Execute LangChain logic
115
+ outputs = execute_langchain(user_input)
116
+
117
+ # Update conversation history
118
+ conversation_history.append(("You", 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"):
129
+ st.text("Bot: Byebye")
130
+ break
131