keesephillips commited on
Commit
ac05f7a
·
verified ·
1 Parent(s): e3ab59f

Upload 7 files

Browse files
Files changed (1) hide show
  1. main.py +5 -4
main.py CHANGED
@@ -44,7 +44,7 @@ def crop_image(model, original_image):
44
 
45
  Inputs:
46
  model (YOLO): The YOLO model used for object detection.
47
- image_file (str): Path to the image file to be processed.
48
 
49
  Returns:
50
  PIL.Image: The cropped image containing the detected table.
@@ -70,10 +70,11 @@ def process_image(model, image):
70
  Process the uploaded image with YOLO model and draw bounding boxes with class-specific colors.
71
 
72
  Inputs:
73
- uploaded_image (UploadedFile): The image file uploaded through Streamlit.
74
-
 
75
  Returns:
76
- PIL.Image: The processed image with bounding boxes and labels.
77
  """
78
  colors = {'title': (255, 0, 0),
79
  'text': (0, 255, 0),
 
44
 
45
  Inputs:
46
  model (YOLO): The YOLO model used for object detection.
47
+ original_image (PIL.image): The image to be processed.
48
 
49
  Returns:
50
  PIL.Image: The cropped image containing the detected table.
 
70
  Process the uploaded image with YOLO model and draw bounding boxes with class-specific colors.
71
 
72
  Inputs:
73
+ model: The trained YOLO model
74
+ image: The image file uploaded through Streamlit.
75
+
76
  Returns:
77
+ PIL.Image: The processed image with bounding boxes and labels.
78
  """
79
  colors = {'title': (255, 0, 0),
80
  'text': (0, 255, 0),