m7mdal7aj commited on
Commit
7537a6a
1 Parent(s): 4b5bced

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -12
app.py CHANGED
@@ -97,18 +97,14 @@ def perform_object_detection(image, model_name, threshold):
97
  """
98
 
99
 
100
- try:
101
- # Perform object detection and draw bounding boxes
102
- st.write("9999999999999")
103
- processed_image, detected_objects = detect_and_draw_objects(image, model_name, threshold)
104
- st.write("66666666666666")
105
- st.write(detected_objects[:20])
106
- return processed_image, detected_objects
107
- except Exception as e:
108
- # Print the error for debugging
109
- print(f"Error in object detection: {e}")
110
- st.write("7777777777777")
111
- return None, str(e)
112
 
113
 
114
  # Check if the 'Detect Objects' button was clicked
 
97
  """
98
 
99
 
100
+
101
+ # Perform object detection and draw bounding boxes
102
+ st.write("9999999999999")
103
+ processed_image, detected_objects = detect_and_draw_objects(image, model_name, threshold)
104
+ st.write("66666666666666")
105
+ st.write(detected_objects[:20])
106
+ return processed_image, detected_objects
107
+
 
 
 
 
108
 
109
 
110
  # Check if the 'Detect Objects' button was clicked