Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -15,8 +15,11 @@ def respond(english_text):
|
|
15 |
try:
|
16 |
output = response[0]['generated_text']
|
17 |
|
18 |
-
except
|
19 |
-
|
|
|
|
|
|
|
20 |
|
21 |
return output
|
22 |
|
|
|
15 |
try:
|
16 |
output = response[0]['generated_text']
|
17 |
|
18 |
+
except Exception as e:
|
19 |
+
if 'estimated_time' in response:
|
20 |
+
output = f"Model is loading. Estimated time {response['estimated_time']}"
|
21 |
+
else:
|
22 |
+
output = e
|
23 |
|
24 |
return output
|
25 |
|