Spaces:
Runtime error
Runtime error
Add error msg display for API
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ def predict(text, seed, out_seq_length, min_gen_length, sampling_strategy,
|
|
45 |
return 'Timeout! Please wait a few minutes and retry'
|
46 |
|
47 |
if response['status'] == 1:
|
48 |
-
return '
|
49 |
|
50 |
answer = response['result']['output']['raw']
|
51 |
if isinstance(answer, list):
|
|
|
45 |
return 'Timeout! Please wait a few minutes and retry'
|
46 |
|
47 |
if response['status'] == 1:
|
48 |
+
return response['result']['errmsg']
|
49 |
|
50 |
answer = response['result']['output']['raw']
|
51 |
if isinstance(answer, list):
|