Ramendra commited on
Commit
7b3a782
·
1 Parent(s): d4b3267

app updated

Browse files
Files changed (3) hide show
  1. app.py +1 -1
  2. examples/cat.1502.jpg +0 -0
  3. examples/cat.1505.jpg +0 -0
app.py CHANGED
@@ -27,7 +27,7 @@ def predict(img):
27
 
28
  # Create a prediction label and prediction probability dictionary for each prediction class
29
  # This is the required format for Gradio's output parameter
30
- pred_labels_and_probs = {'dog' if MODEL.predict(features)> 0.5 else 'cat':float(MODEL.predict(features))}
31
 
32
  # Calculate the prediction time
33
  pred_time = round(timer() - start_time, 5)
 
27
 
28
  # Create a prediction label and prediction probability dictionary for each prediction class
29
  # This is the required format for Gradio's output parameter
30
+ pred_labels_and_probs = {'dog':float(MODEL.predict(features))} if MODEL.predict(features)> 0.5 else {'cat':100-float(MODEL.predict(features))}
31
 
32
  # Calculate the prediction time
33
  pred_time = round(timer() - start_time, 5)
examples/cat.1502.jpg ADDED
examples/cat.1505.jpg DELETED
Binary file (9.74 kB)