srijonashraf
commited on
Commit
•
3d58674
1
Parent(s):
708ba2b
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ def predict(image):
|
|
40 |
predicted_class = np.argmax(predictions)
|
41 |
confidence = np.max(predictions)
|
42 |
|
43 |
-
if confidence <= 0.
|
44 |
return "Unknown Object"
|
45 |
else:
|
46 |
return {class_names[predicted_class]: float(confidence)}
|
|
|
40 |
predicted_class = np.argmax(predictions)
|
41 |
confidence = np.max(predictions)
|
42 |
|
43 |
+
if confidence <= 0.5:
|
44 |
return "Unknown Object"
|
45 |
else:
|
46 |
return {class_names[predicted_class]: float(confidence)}
|