hanyullai commited on
Commit
1a4ddbc
1 Parent(s): 38ab96b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -39,7 +39,7 @@ def predict(text, seed, out_seq_length, min_gen_length, sampling_strategy,
39
  'Content-Type': 'application/json'
40
  }
41
 
42
- response = requests.request("POST", url, headers=headers, data=payload).json()
43
 
44
  if response['status'] == 1:
45
  return 'Please give smaller text than max_tokens or give larger max_tokens.'
 
39
  'Content-Type': 'application/json'
40
  }
41
 
42
+ response = requests.request("POST", url, headers=headers, data=payload, timeout=(20, 100)).json()
43
 
44
  if response['status'] == 1:
45
  return 'Please give smaller text than max_tokens or give larger max_tokens.'