VishnuEcoClim commited on
Commit
884a5e9
·
1 Parent(s): 4e2b75d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -7,7 +7,7 @@ import io
7
  from utils import *
8
 
9
  # Initialize labels and model
10
- labels = ['cardboard', 'glass', 'metal', 'paper', 'plastic', 'trash']#gen_labels()
11
  model = model_arc() # Assuming this function initializes and returns a trained model
12
 
13
  # Streamlit UI
@@ -55,6 +55,7 @@ try:
55
  #model.load_weights("classify_model.h5")
56
 
57
  prediction = model.predict(img[np.newaxis, ...])
 
58
  st.info('Hey! The uploaded image has been classified as " {} waste " '.format(labels[np.argmax(prediction[0], axis=-1)]))
59
  except Exception as e:
60
  st.info(e)
 
7
  from utils import *
8
 
9
  # Initialize labels and model
10
+ labels = gen_labels()
11
  model = model_arc() # Assuming this function initializes and returns a trained model
12
 
13
  # Streamlit UI
 
55
  #model.load_weights("classify_model.h5")
56
 
57
  prediction = model.predict(img[np.newaxis, ...])
58
+ st.info(print(prediction))
59
  st.info('Hey! The uploaded image has been classified as " {} waste " '.format(labels[np.argmax(prediction[0], axis=-1)]))
60
  except Exception as e:
61
  st.info(e)