Ahmed235 commited on
Commit
a2d9e40
1 Parent(s): 1acad40

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -32,7 +32,12 @@ def predict_image(image):
32
  prediction_dict = {"prediction": predict_label, "confidence": confidence}
33
  #return prediction_dict
34
  probability_good = outputs[0][0]
35
- return probability_good
 
 
 
 
 
36
 
37
  # Create the interface
38
  input_interface = gr.Image(type = "pil")
 
32
  prediction_dict = {"prediction": predict_label, "confidence": confidence}
33
  #return prediction_dict
34
  probability_good = outputs[0][0]
35
+ result = {
36
+ "prediction": "Your Teeth are Good & You Don't Need To Visit Doctor" if probability_good > 0.5 else "Your Teeth are Bad & You Need To Visit Doctor"
37
+ }
38
+
39
+ return result
40
+
41
 
42
  # Create the interface
43
  input_interface = gr.Image(type = "pil")