D3V1L1810 commited on
Commit
e610de9
·
verified ·
1 Parent(s): 8b6a0d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -19,6 +19,7 @@ async def fetch_image(url):
19
  async with session.get(url) as response:
20
  if response.status == 200:
21
  image_data = await response.read()
 
22
  return Image.open(BytesIO(image_data))
23
  else:
24
  logging.error(f"Failed to load image from {url}")
@@ -31,7 +32,7 @@ async def detect_objects(images):
31
  processed_images = [cv2.resize(np.array(image), (640, 640)) for image in images]
32
 
33
  results_detection = model_detection(processed_images)
34
-
35
  for image, detection in zip(processed_images, results_detection):
36
  names = []
37
  if detection:
 
19
  async with session.get(url) as response:
20
  if response.status == 200:
21
  image_data = await response.read()
22
+ print("1")
23
  return Image.open(BytesIO(image_data))
24
  else:
25
  logging.error(f"Failed to load image from {url}")
 
32
  processed_images = [cv2.resize(np.array(image), (640, 640)) for image in images]
33
 
34
  results_detection = model_detection(processed_images)
35
+ print(results_detection)
36
  for image, detection in zip(processed_images, results_detection):
37
  names = []
38
  if detection: