Manel commited on
Commit
9ffdc46
Β·
verified Β·
1 Parent(s): 4fc85c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -278,12 +278,16 @@ if __name__=="__main__":
278
 
279
  user_question = st.chat_input('What do you want to ask ..')
280
 
281
- st.chat_message("AI").write(" ")
282
 
283
  # streamlit chat
284
  if user_question is not None and user_question!="":
285
  with st.chat_message("Human", avatar="πŸ§”πŸ»"):
286
  st.write(user_question)
 
 
 
 
 
287
  response = generate_response(user_question, model, all_templates)
288
  with st.chat_message("AI", avatar="πŸ›οΈ"):
289
  st.write(response)
 
278
 
279
  user_question = st.chat_input('What do you want to ask ..')
280
 
 
281
 
282
  # streamlit chat
283
  if user_question is not None and user_question!="":
284
  with st.chat_message("Human", avatar="πŸ§”πŸ»"):
285
  st.write(user_question)
286
+
287
+ if response:
288
+ # to empty response container after first pass
289
+ st.chat_message("AI", avatar="πŸ›οΈ").write(" ")
290
+
291
  response = generate_response(user_question, model, all_templates)
292
  with st.chat_message("AI", avatar="πŸ›οΈ"):
293
  st.write(response)