peterpeter8585 commited on
Commit
ef19b75
·
verified ·
1 Parent(s): e95965f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -132,7 +132,7 @@ def model(message,history: list[tuple[str, str]],system_message,max_tokens,tempe
132
  web2 = ' '.join([f"Link: {res['link']}\nText: {res['text']}\n\n" for res in web_results])
133
  formatted_prompt = system_instructions1 + message + "[WEB]" + str(web2) + "[OpenGPT 4o]"
134
  stream = client.text_generation(formatted_prompt, max_new_tokens=max_tokens, stream=True, temperature=temperature, details=True, return_full_text=False, top_p=top_p)
135
- response = ""
136
  token = "".join([response.token.text for response in stream if response.token.text != "</s>"])
137
 
138
  response += token
 
132
  web2 = ' '.join([f"Link: {res['link']}\nText: {res['text']}\n\n" for res in web_results])
133
  formatted_prompt = system_instructions1 + message + "[WEB]" + str(web2) + "[OpenGPT 4o]"
134
  stream = client.text_generation(formatted_prompt, max_new_tokens=max_tokens, stream=True, temperature=temperature, details=True, return_full_text=False, top_p=top_p)
135
+ response = ""
136
  token = "".join([response.token.text for response in stream if response.token.text != "</s>"])
137
 
138
  response += token