Ahmed235 commited on
Commit
cf6fe5b
·
verified ·
1 Parent(s): 5f080d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -36,9 +36,9 @@ def predict_image(image):
36
  predict_label = "Clean"
37
  else:
38
  predict_label = "Carries"
39
- confidence = float(np.max(predictions))
40
- prediction_dict = {"prediction": predict_label, "confidence": confidence}
41
- return json.dumps(prediction_dict, indent=2)
42
 
43
  # Create the interface
44
  input_interface = gr.Image(type = "pil")
 
36
  predict_label = "Clean"
37
  else:
38
  predict_label = "Carries"
39
+ #confidence = float(np.max(predictions))
40
+ prediction_dict = {"prediction": predict_label}
41
+ return json.dumps(prediction_dict, indent=1)
42
 
43
  # Create the interface
44
  input_interface = gr.Image(type = "pil")