mginoben commited on
Commit
65003e6
1 Parent(s): 5659c28

Error handling

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -129,8 +129,8 @@ def predict(tweet):
129
 
130
  if type(prediction) == dict:
131
  print(prediction)
132
- loading_time = prediction['estimated_time']
133
- return f"Loading Model (Estimated Time: {loading_time} Seconds)"
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: