YC-Chen commited on
Commit
aba2c00
1 Parent(s): f93772b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -158,7 +158,7 @@ with gr.Blocks() as demo:
158
  }
159
 
160
  start_time = time.time()
161
- with requests.post(API_URL, headers=HEADERS, data=json.dumps(data), stream=True) as r:
162
  for response in r.iter_lines():
163
  if len(response) > 0:
164
  text = response.decode()
 
158
  }
159
 
160
  start_time = time.time()
161
+ with requests.post(API_URL, headers=HEADERS, data=json.dumps(data), stream=True, timeout=30) as r:
162
  for response in r.iter_lines():
163
  if len(response) > 0:
164
  text = response.decode()