yuantao-infini-ai commited on
Commit
dfe75a1
1 Parent(s): 72e6273

Init commit

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -170,18 +170,19 @@ def bot(
170
  "top_k": top_k,
171
  "temperature": temperature,
172
  "repetition_penalty": repetition_penalty,
173
- "max_new_tokens": max_new_tokens
 
174
  }
175
  }
176
 
177
- response = requests.post(
178
  API_URL,
179
  json=payload,
180
  headers={'Accept': 'text/event-stream'},
181
  stream=True
182
  )
183
-
184
  response_text = ""
 
185
  for text in parse_sse_response(response):
186
  response_text += text
187
  yield history + [{"role": "assistant", "content": response_text}]
 
170
  "top_k": top_k,
171
  "temperature": temperature,
172
  "repetition_penalty": repetition_penalty,
173
+ "max_new_tokens": max_new_tokens,
174
+ "num_beams": 3,
175
  }
176
  }
177
 
178
+ response = requests.get(
179
  API_URL,
180
  json=payload,
181
  headers={'Accept': 'text/event-stream'},
182
  stream=True
183
  )
 
184
  response_text = ""
185
+
186
  for text in parse_sse_response(response):
187
  response_text += text
188
  yield history + [{"role": "assistant", "content": response_text}]