YC-Chen commited on
Commit
b040fe2
1 Parent(s): dc8ccba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -178,6 +178,7 @@ with gr.Blocks() as demo:
178
  keep_streaming = True
179
  s = requests.Session()
180
  with s.post(API_URL, headers=HEADERS, json=data, stream=True, timeout=30) as r:
 
181
  for line in r.iter_lines():
182
  if line and keep_streaming:
183
  if r.status_code != 200:
 
178
  keep_streaming = True
179
  s = requests.Session()
180
  with s.post(API_URL, headers=HEADERS, json=data, stream=True, timeout=30) as r:
181
+ time.sleep(0.3)
182
  for line in r.iter_lines():
183
  if line and keep_streaming:
184
  if r.status_code != 200: