affine commited on
Commit
062e255
·
1 Parent(s): 9a145c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -83,11 +83,10 @@ if prompt := st.chat_input("What is up?"):
83
  with st.chat_message("assistant"):
84
  message_placeholder = st.empty()
85
  full_response = ""
86
- for response in model(final_prompt):
87
  full_response += response
88
  message_placeholder.markdown(response + "▌")
89
- wrapped_text = textwrap.fill(full_response, width=100)
90
- message_placeholder.markdown(wrapped_text)
91
  st.session_state.messages.append(
92
  {"role": "assistant", "content": full_response}
93
  )
 
83
  with st.chat_message("assistant"):
84
  message_placeholder = st.empty()
85
  full_response = ""
86
+ for response in model.predict(final_prompt):
87
  full_response += response
88
  message_placeholder.markdown(response + "▌")
89
+ message_placeholder.markdown(full_response)
 
90
  st.session_state.messages.append(
91
  {"role": "assistant", "content": full_response}
92
  )