Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ def infer(prompt, max_new_tokens=10, temperature=0.0, top_p=1.0):
|
|
7 |
my_post_dict = {
|
8 |
"type": "general",
|
9 |
"payload": {
|
10 |
-
"max_tokens": max_new_tokens,
|
11 |
"n": 1,
|
12 |
"temperature": float(temperature),
|
13 |
"top_p": float(top_p),
|
@@ -27,7 +27,7 @@ def infer(prompt, max_new_tokens=10, temperature=0.0, top_p=1.0):
|
|
27 |
|
28 |
job_id = requests.post("https://planetd.shift.ml/jobs", json=my_post_dict).json()['id']
|
29 |
|
30 |
-
|
31 |
|
32 |
time.sleep(1)
|
33 |
|
|
|
7 |
my_post_dict = {
|
8 |
"type": "general",
|
9 |
"payload": {
|
10 |
+
"max_tokens": int(max_new_tokens),
|
11 |
"n": 1,
|
12 |
"temperature": float(temperature),
|
13 |
"top_p": float(top_p),
|
|
|
27 |
|
28 |
job_id = requests.post("https://planetd.shift.ml/jobs", json=my_post_dict).json()['id']
|
29 |
|
30 |
+
for i in range(100):
|
31 |
|
32 |
time.sleep(1)
|
33 |
|