Update app.py
Browse files
app.py
CHANGED
@@ -34,12 +34,12 @@ def upload_predict(upload_image, model):
|
|
34 |
|
35 |
# Predicts the model
|
36 |
prediction = model.predict(image)
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
|
42 |
-
return
|
43 |
if file is None:
|
44 |
st.text("Please upload an image file")
|
45 |
else:
|
|
|
34 |
|
35 |
# Predicts the model
|
36 |
prediction = model.predict(image)
|
37 |
+
index = np.argmax(prediction)
|
38 |
+
classname = ['Glass', 'NoGlass']
|
39 |
+
class_name = classname[index]
|
40 |
+
|
41 |
|
42 |
+
return class_name
|
43 |
if file is None:
|
44 |
st.text("Please upload an image file")
|
45 |
else:
|