VishnuEcoClim commited on
Commit
8237807
·
1 Parent(s): 22d0d15

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -5
app.py CHANGED
@@ -46,18 +46,13 @@ if 'image' in locals(): # Check if image variable exists
46
  if st.button('Predict'):
47
  try:
48
  model = model_arc() # Initialize your model
49
- st.info('Worked1')
50
 
51
  # Ensure image shape is correct and add batch dimension
52
  img_array = preprocess(image) # This should return an array of shape (1, 256, 256, 3)
53
 
54
  predicted_class, confidence = classify_garbage(img_array, model)
55
-
56
- st.info('Worked3')
57
 
58
  st.info('The uploaded image has been classified as "{}" with {:.2f}% confidence.'.format(predicted_class, confidence))
59
-
60
- st.info('Worked4')
61
 
62
  except Exception as e:
63
  st.error(f"An error occurred: {e}")
 
46
  if st.button('Predict'):
47
  try:
48
  model = model_arc() # Initialize your model
 
49
 
50
  # Ensure image shape is correct and add batch dimension
51
  img_array = preprocess(image) # This should return an array of shape (1, 256, 256, 3)
52
 
53
  predicted_class, confidence = classify_garbage(img_array, model)
 
 
54
 
55
  st.info('The uploaded image has been classified as "{}" with {:.2f}% confidence.'.format(predicted_class, confidence))
 
 
56
 
57
  except Exception as e:
58
  st.error(f"An error occurred: {e}")