BaRiDo commited on
Commit
1df37aa
·
verified ·
1 Parent(s): 0e28843

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -225,18 +225,18 @@ with col2:
225
  # User input in Streamlit
226
  user_input = st.chat_input("Describe your policy or project to find relevant Lab Lab projects...")
227
 
228
- if user_input:
229
 
230
  # Display user message
231
- st.chat_message("user").markdown(user_input)
232
 
233
- grounding = proximity_search(user_input)
234
 
235
  # add the submissions as context (only in prompt, not in history)
236
- prompt = user_input + ". If a project is mentioned, share the image. The context for the question: " + grounding;
237
  messages = st.session_state.messages.copy()
238
  messages.append({"role": "user", "content": prompt})
239
- st.session_state.messages.append({"role": "user", "content": user_input})
240
 
241
  # Get response from IBM
242
  with st.spinner("Thinking..."):
 
225
  # User input in Streamlit
226
  user_input = st.chat_input("Describe your policy or project to find relevant Lab Lab projects...")
227
 
228
+ if st.session_state["user_input"]:
229
 
230
  # Display user message
231
+ #st.chat_message("user").markdown(st.session_state["user_input"])
232
 
233
+ grounding = proximity_search(st.session_state["user_input"])
234
 
235
  # add the submissions as context (only in prompt, not in history)
236
+ prompt = st.session_state["user_input"] + ". If a project is mentioned, share the image. The context for the question: " + grounding;
237
  messages = st.session_state.messages.copy()
238
  messages.append({"role": "user", "content": prompt})
239
+ st.session_state.messages.append({"role": "user", "content": st.session_state["user_input"]})
240
 
241
  # Get response from IBM
242
  with st.spinner("Thinking..."):