m7mdal7aj commited on
Commit
faace7f
·
verified ·
1 Parent(s): b040efe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -118,13 +118,13 @@ if detect_button:
118
  # Perform object detection
119
  processed_image, detected_objects = perform_object_detection(image, detect_model, threshold)
120
 
121
- if processed_image:
122
- # Display the image with detected objects
123
- st.image(processed_image, use_column_width=True, caption="Image with Detected Objects")
124
- # Display the detected objects as text
125
- st.write(detected_objects)
126
- else:
127
- st.error("Failed to process image for object detection.")
128
 
129
  except Exception as e:
130
  st.error(f"Error loading image: {e}")
 
118
  # Perform object detection
119
  processed_image, detected_objects = perform_object_detection(image, detect_model, threshold)
120
 
121
+ #if processed_image:
122
+ # Display the image with detected objects
123
+ st.image(processed_image, use_column_width=True, caption="Image with Detected Objects")
124
+ # Display the detected objects as text
125
+ st.write(detected_objects)
126
+ #else:
127
+ # st.error("Failed to process image for object detection.")
128
 
129
  except Exception as e:
130
  st.error(f"Error loading image: {e}")