kaleidoskop-hug commited on
Commit
40d82ac
·
verified ·
1 Parent(s): 0029ae0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -40,7 +40,7 @@ def ask_assistant_stream(st_model, st_messages, st_temp_value, st_max_tokens):
40
  stream=True,
41
  max_tokens=st_max_tokens,
42
  )
43
- response["stream"]=stream
44
 
45
  except Exception as e:
46
  pass
@@ -142,6 +142,7 @@ if prompt := st.chat_input(f"Hi I'm {selected_model}, ask me a question"):
142
 
143
  # Display assistant response in chat message container
144
  assistant = ask_assistant_stream(model_links[selected_model], st.session_state.messages, temp_values, max_token_value)
 
145
  if "stream" in assistant:
146
  with st.chat_message("assistant"):
147
  response = st.write_stream(assistant["stream"])
 
40
  stream=True,
41
  max_tokens=st_max_tokens,
42
  )
43
+ response["stream"] = stream
44
 
45
  except Exception as e:
46
  pass
 
142
 
143
  # Display assistant response in chat message container
144
  assistant = ask_assistant_stream(model_links[selected_model], st.session_state.messages, temp_values, max_token_value)
145
+ st.write assistant
146
  if "stream" in assistant:
147
  with st.chat_message("assistant"):
148
  response = st.write_stream(assistant["stream"])