merve HF staff commited on
Commit
b82833a
1 Parent(s): d08c883

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -28,9 +28,10 @@ for msg in message_history:
28
  placeholder = st.empty() # placeholder for latest message
29
 
30
  with placeholder.container():
31
- if message_history[-1] != "":
 
32
 
33
- message(message_history[-1]["text"], message_history[-1]["is_user"]) # display the latest message
34
 
35
  input = st.text_input("Ask me 🤗")
36
  message(input, is_user=True) # align's the message to the right
 
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