YC-Chen commited on
Commit
bb3599e
1 Parent(s): aba2c00

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -12
app.py CHANGED
@@ -143,20 +143,18 @@ with gr.Blocks() as demo:
143
  yield history
144
  else:
145
  data = {
146
- "model": "breeze-7b-instruct-v01",
147
  "prompt": str(message),
148
- "temperature": float(temperature),
149
- "n": 1,
150
- "max_tokens": int(max_new_tokens),
151
- "stop": "",
152
- "top_p": float(top_p),
153
- "logprobs": 0,
154
- "echo": False,
155
- "presence_penalty": PRESENCE_PENALTY,
156
- "frequency_penalty": FREQUENCY_PENALTY,
157
- "stream": True,
158
  }
159
-
160
  start_time = time.time()
161
  with requests.post(API_URL, headers=HEADERS, data=json.dumps(data), stream=True, timeout=30) as r:
162
  for response in r.iter_lines():
 
143
  yield history
144
  else:
145
  data = {
146
+ "model_type": "breeze-7b-instruct-v01",
147
  "prompt": str(message),
148
+ "priority": "HIGH",
149
+ "parameters": {
150
+ "temperature": str(message),
151
+ "top_k": 10000,
152
+ "top_p": float(top_p),
153
+ "max_new_tokens": int(max_new_tokens),
154
+
155
+ }
 
 
156
  }
157
+
158
  start_time = time.time()
159
  with requests.post(API_URL, headers=HEADERS, data=json.dumps(data), stream=True, timeout=30) as r:
160
  for response in r.iter_lines():