Spaces:
Runtime error
Runtime error
Error handling
Browse files
app.py
CHANGED
@@ -129,8 +129,8 @@ def predict(tweet):
|
|
129 |
|
130 |
if type(prediction) == dict:
|
131 |
print(prediction)
|
132 |
-
|
133 |
-
return
|
134 |
|
135 |
|
136 |
if bool(matched_profanity) == False:
|
|
|
129 |
|
130 |
if type(prediction) == dict:
|
131 |
print(prediction)
|
132 |
+
error_message = prediction['error']
|
133 |
+
return error_message
|
134 |
|
135 |
|
136 |
if bool(matched_profanity) == False:
|