Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ def predict(text, seed, out_seq_length, min_gen_length, sampling_strategy,
|
|
42 |
try:
|
43 |
response = requests.request("POST", url, headers=headers, data=payload, timeout=(20, 100)).json()
|
44 |
except Exception as e:
|
45 |
-
|
46 |
|
47 |
if response['status'] == 1:
|
48 |
return 'Please give smaller text than max_tokens or give larger max_tokens.'
|
|
|
42 |
try:
|
43 |
response = requests.request("POST", url, headers=headers, data=payload, timeout=(20, 100)).json()
|
44 |
except Exception as e:
|
45 |
+
return 'Timeout! Please wait a few minutes and retry'
|
46 |
|
47 |
if response['status'] == 1:
|
48 |
return 'Please give smaller text than max_tokens or give larger max_tokens.'
|