merttaymaz commited on
Commit
97e56e7
·
verified ·
1 Parent(s): 0bbf19c

Update app.py

Browse files

change image type to PIL.image

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -7,6 +7,7 @@ import os
7
  import cv2
8
  import gradio as gr
9
  from tools.final_answer import FinalAnswerTool
 
10
  from Gradio_UI import GradioUI
11
 
12
  # OpenCV Haarcascade face model
@@ -21,7 +22,7 @@ FACE_DETECTION_MIN_NEIGHBORS = 5
21
  MIN_FACE_SIZE = (80, 80) # Min Face Size (width, height)
22
 
23
  @tool
24
- def check_passport_photo(image) -> bool:
25
  """
26
  Check if the given image is a valid passport photo.
27
 
 
7
  import cv2
8
  import gradio as gr
9
  from tools.final_answer import FinalAnswerTool
10
+ from PIL import Image
11
  from Gradio_UI import GradioUI
12
 
13
  # OpenCV Haarcascade face model
 
22
  MIN_FACE_SIZE = (80, 80) # Min Face Size (width, height)
23
 
24
  @tool
25
+ def check_passport_photo(image: Image.Image) -> bool:
26
  """
27
  Check if the given image is a valid passport photo.
28