srijonashraf
commited on
Commit
•
39cf849
1
Parent(s):
fda2826
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def predict(image):
|
|
29 |
predicted_class = np.argmax(predictions[0])
|
30 |
confidence = np.max(predictions[0])
|
31 |
|
32 |
-
if confidence <= 0.
|
33 |
return "Unknown Object"
|
34 |
else:
|
35 |
return {class_names[predicted_class]: float(confidence)}
|
|
|
29 |
predicted_class = np.argmax(predictions[0])
|
30 |
confidence = np.max(predictions[0])
|
31 |
|
32 |
+
if confidence <= 0.5:
|
33 |
return "Unknown Object"
|
34 |
else:
|
35 |
return {class_names[predicted_class]: float(confidence)}
|