Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -97,6 +97,7 @@ def detect(image):
|
|
97 |
}
|
98 |
|
99 |
def classify(image):
|
|
|
100 |
detection = detect(image)
|
101 |
|
102 |
if detection["top"] == 0 and detection["left"] == 0 and detection["width"] == 0 and detection["height"] == 0:
|
@@ -123,7 +124,9 @@ def classify(image):
|
|
123 |
print(f"{formatted_time} {sorted_result}")
|
124 |
return {
|
125 |
"detection": detection,
|
126 |
-
"classification": sorted_result
|
|
|
|
|
127 |
}
|
128 |
|
129 |
|
|
|
97 |
}
|
98 |
|
99 |
def classify(image):
|
100 |
+
image_width, image_height = image.size
|
101 |
detection = detect(image)
|
102 |
|
103 |
if detection["top"] == 0 and detection["left"] == 0 and detection["width"] == 0 and detection["height"] == 0:
|
|
|
124 |
print(f"{formatted_time} {sorted_result}")
|
125 |
return {
|
126 |
"detection": detection,
|
127 |
+
"classification": sorted_result,
|
128 |
+
"image_width": image_width,
|
129 |
+
"image_height": image_height
|
130 |
}
|
131 |
|
132 |
|