gulixin0922 commited on
Commit
662776d
1 Parent(s): be2ccdc

add timeout

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -294,7 +294,7 @@ def http_bot(
294
 
295
  try:
296
  # Stream output
297
- response = requests.post(worker_addr, json=pload, headers=headers, stream=True)
298
  finnal_output = ''
299
  for chunk in response.iter_lines(decode_unicode=False, delimiter=b"\n"):
300
  if chunk:
 
294
 
295
  try:
296
  # Stream output
297
+ response = requests.post(worker_addr, json=pload, headers=headers, stream=True, timeout=40)
298
  finnal_output = ''
299
  for chunk in response.iter_lines(decode_unicode=False, delimiter=b"\n"):
300
  if chunk: