Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -157,7 +157,8 @@ with gr.Blocks() as demo:
|
|
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 |
-
|
|
|
161 |
json_response = json.loads(line)
|
162 |
|
163 |
try:
|
@@ -271,5 +272,5 @@ with gr.Blocks() as demo:
|
|
271 |
|
272 |
gr.Markdown(LICENSE)
|
273 |
|
274 |
-
demo.queue(concurrency_count=
|
275 |
demo.launch()
|
|
|
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 |
+
if r.status_code != 200:
|
161 |
+
print('[warn] status_code != 200')
|
162 |
json_response = json.loads(line)
|
163 |
|
164 |
try:
|
|
|
272 |
|
273 |
gr.Markdown(LICENSE)
|
274 |
|
275 |
+
demo.queue(concurrency_count=1, max_size=128)
|
276 |
demo.launch()
|