pragneshbarik commited on
Commit
bac1424
1 Parent(s): 2e2d510

Improved inference

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -190,8 +190,8 @@ if prompt := st.chat_input("Chat with Ikigai Docs..."):
190
  placeholder = st.empty()
191
  if st.session_state.rag_enabled :
192
  for chunk in chat_stream :
193
- if chunk.token['text']!='</s>' :
194
- full_response += chunk.token["text"]
195
 
196
  placeholder.markdown(full_response + " |")
197
 
@@ -200,7 +200,7 @@ if prompt := st.chat_input("Chat with Ikigai Docs..."):
200
  else :
201
  for chunk in chat_stream :
202
  if chunk.token['text']!='</s>' :
203
- full_response += chunk.token["text"]
204
  placeholder.markdown(full_response + " |")
205
  placeholder.markdown(full_response)
206
 
 
190
  placeholder = st.empty()
191
  if st.session_state.rag_enabled :
192
  for chunk in chat_stream :
193
+ if chunk.token.text!='</s>' :
194
+ full_response += chunk.token.text
195
 
196
  placeholder.markdown(full_response + " |")
197
 
 
200
  else :
201
  for chunk in chat_stream :
202
  if chunk.token['text']!='</s>' :
203
+ full_response += chunk.token.text
204
  placeholder.markdown(full_response + " |")
205
  placeholder.markdown(full_response)
206