HawkeyeHS commited on
Commit
7056bd3
·
1 Parent(s): de568f3

Add application file

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -49,6 +49,6 @@ def predict():
49
  print(model.config.id2label[predicted_class_idx])
50
  # Return the predictions
51
  return json.dumps({"class": model.config.id2label[predicted_class_idx]})
52
- except:
 
53
  return json.dumps({"Uh oh": "We are down"})
54
-
 
49
  print(model.config.id2label[predicted_class_idx])
50
  # Return the predictions
51
  return json.dumps({"class": model.config.id2label[predicted_class_idx]})
52
+ except Exception as e:
53
+ print(f"An error occurred: {str(e)}")
54
  return json.dumps({"Uh oh": "We are down"})