Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -42,8 +42,6 @@ HEADERS = {
|
|
42 |
"accept": "application/json"
|
43 |
}
|
44 |
|
45 |
-
PRESENCE_PENALTY=0
|
46 |
-
FREQUENCY_PENALTY=1.1
|
47 |
|
48 |
MAX_SEC = 30
|
49 |
|
@@ -156,7 +154,7 @@ with gr.Blocks() as demo:
|
|
156 |
start_time = time.time()
|
157 |
keep_streaming = True
|
158 |
s = requests.Session()
|
159 |
-
with s.post(API_URL, headers=HEADERS, json=data, stream=True) as r:
|
160 |
for line in r.iter_lines():
|
161 |
if line and keep_streaming:
|
162 |
assert r.status_code == 200
|
|
|
42 |
"accept": "application/json"
|
43 |
}
|
44 |
|
|
|
|
|
45 |
|
46 |
MAX_SEC = 30
|
47 |
|
|
|
154 |
start_time = time.time()
|
155 |
keep_streaming = True
|
156 |
s = requests.Session()
|
157 |
+
with s.post(API_URL, headers=HEADERS, json=data, stream=True, timeout=30) as r:
|
158 |
for line in r.iter_lines():
|
159 |
if line and keep_streaming:
|
160 |
assert r.status_code == 200
|