Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -143,20 +143,18 @@ with gr.Blocks() as demo:
|
|
| 143 |
yield history
|
| 144 |
else:
|
| 145 |
data = {
|
| 146 |
-
"
|
| 147 |
"prompt": str(message),
|
| 148 |
-
"
|
| 149 |
-
"
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 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():
|