Update app.py
Browse files
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)
|