VishnuEcoClim commited on
Commit
e6bdb43
·
1 Parent(s): 977cc9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -10
app.py CHANGED
@@ -51,16 +51,7 @@ try:
51
  img = preprocess(image)
52
 
53
  model = model_arc()
54
-
55
- image_url = "https://drive.google.com/file/d/1jc_gp8qR8t6e8z8WOA_K-SqfurN7Z8vn/view?usp=sharing"
56
- r = requests.get(image_url)
57
-
58
- # Save the content of the response to a temporary file
59
- with open("temp_weights.h5", "wb") as f:
60
- f.write(r.content)
61
-
62
- # Load the weights from the temporary file
63
- model.load_weights("temp_weights.h5")
64
 
65
  prediction = model.predict(img)
66
  st.info('Hey! The uploaded image has been classified as "{} waste" '.format(labels[np.argmax(prediction)]))
 
51
  img = preprocess(image)
52
 
53
  model = model_arc()
54
+ model.load_weights("classify_model.h5")
 
 
 
 
 
 
 
 
 
55
 
56
  prediction = model.predict(img)
57
  st.info('Hey! The uploaded image has been classified as "{} waste" '.format(labels[np.argmax(prediction)]))