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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ import io
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,7 +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[prediction]))#np.argmax(prediction[0], axis=-1)]))
59
  except Exception as e:
60
  st.info(e)
61
  pass
 
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
  #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)
61
  pass