Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -20,10 +20,7 @@ def count_packages(image, model_choice):
|
|
20 |
# Get the number of detected boxes (packages)
|
21 |
package_count = len(results[0].boxes)
|
22 |
|
23 |
-
# Annotate the image with the detected boxes
|
24 |
-
annotated_image = results[0].plot() # Plot the detections on the image
|
25 |
|
26 |
-
return package_count, annotated_image
|
27 |
|
28 |
# Gradio interface with model selection dropdown
|
29 |
inputs = [
|
|
|
20 |
# Get the number of detected boxes (packages)
|
21 |
package_count = len(results[0].boxes)
|
22 |
|
|
|
|
|
23 |
|
|
|
24 |
|
25 |
# Gradio interface with model selection dropdown
|
26 |
inputs = [
|