Spaces:
Sleeping
Sleeping
app updated
Browse files- app.py +1 -1
- examples/cat.1502.jpg +0 -0
- 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)
|
|