max7777 commited on
Commit
f68ae5a
1 Parent(s): 93f568b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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
- pred_class=decode_predictions(prediction,top=1)
41
 
42
- return pred_class
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: