panda1835 commited on
Commit
803d45d
·
verified ·
1 Parent(s): c670de6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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