Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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':float(MODEL.predict(features))} if MODEL.predict(features)> 0.5 else {'cat':
|
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':1-float(MODEL.predict(features))}
|
31 |
|
32 |
# Calculate the prediction time
|
33 |
pred_time = round(timer() - start_time, 5)
|