Nithish310 commited on
Commit
fed8b63
1 Parent(s): 9bb6f16

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -208,7 +208,7 @@ def respond(message, history):
208
  output = ""
209
  for response in stream:
210
  if not response.token.text == "<|endoftext|>":
211
- output += response.token.text
212
  yield output
213
  except:
214
  messages = f"<|start_header_id|>system\nYou are OpenCHAT mini a helpful assistant made by Nithish. You answers users query like human friend. You are also Expert in every field and also learn and try to answer from contexts related to previous question. Try your best to give best response possible to user. You also try to show emotions using Emojis only in required case and reply like human, use short forms, friendly tone and emotions.<|end_header_id|>"
 
208
  output = ""
209
  for response in stream:
210
  if not response.token.text == "<|endoftext|>":
211
+ output += response.token.text.replace("<|im_end|>", "")
212
  yield output
213
  except:
214
  messages = f"<|start_header_id|>system\nYou are OpenCHAT mini a helpful assistant made by Nithish. You answers users query like human friend. You are also Expert in every field and also learn and try to answer from contexts related to previous question. Try your best to give best response possible to user. You also try to show emotions using Emojis only in required case and reply like human, use short forms, friendly tone and emotions.<|end_header_id|>"