merve HF Staff commited on
Commit
555c56e
·
1 Parent(s): cf322df

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -27,14 +27,14 @@ for msg in message_history:
27
 
28
  placeholder = st.empty() # placeholder for latest message
29
 
30
- #with placeholder.container():
31
- # last_message = message_history[-1]
32
- # if last_message != "":
33
 
34
- # message(last_message["text"], last_message["is_user"]) # display the latest message
35
 
36
  input = st.text_input("Ask me 🤗")
37
- message(input, is_user=True) # align's the message to the right
38
  message_history.append({"text":input, "is_user" : True})
39
 
40
  data, resp = query(
 
27
 
28
  placeholder = st.empty() # placeholder for latest message
29
 
30
+ with placeholder.container():
31
+ last_message = message_history[-1]
32
+ if last_message != "":
33
 
34
+ message(last_message["text"], last_message["is_user"]) # display the latest message
35
 
36
  input = st.text_input("Ask me 🤗")
37
+
38
  message_history.append({"text":input, "is_user" : True})
39
 
40
  data, resp = query(