derekalia commited on
Commit
c4170ea
·
1 Parent(s): 46b30d6

another 1211

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -85,7 +85,6 @@ def process(
85
  dino_labled_img, label_coordinates, parsed_content_list = get_som_labeled_img(image_save_path, yolo_model, BOX_TRESHOLD = box_threshold, output_coord_in_ratio=False, ocr_bbox=ocr_bbox,draw_bbox_config=draw_bbox_config, caption_model_processor=caption_model_processor, ocr_text=text,iou_threshold=iou_threshold)
86
  image = Image.open(io.BytesIO(base64.b64decode(dino_labled_img)))
87
  print('finish processing')
88
- parsed_content_list = '\n'.join(parsed_content_list)
89
 
90
  # Format the coordinates output in a more readable way
91
  # coordinates_text = "Bounding Box Coordinates (x, y, width, height):\n"
@@ -110,6 +109,11 @@ def process(
110
  else:
111
  combined_content.append(content)
112
 
 
 
 
 
 
113
  return image, str(parsed_content_list), str(combined_content)
114
 
115
 
 
85
  dino_labled_img, label_coordinates, parsed_content_list = get_som_labeled_img(image_save_path, yolo_model, BOX_TRESHOLD = box_threshold, output_coord_in_ratio=False, ocr_bbox=ocr_bbox,draw_bbox_config=draw_bbox_config, caption_model_processor=caption_model_processor, ocr_text=text,iou_threshold=iou_threshold)
86
  image = Image.open(io.BytesIO(base64.b64decode(dino_labled_img)))
87
  print('finish processing')
 
88
 
89
  # Format the coordinates output in a more readable way
90
  # coordinates_text = "Bounding Box Coordinates (x, y, width, height):\n"
 
109
  else:
110
  combined_content.append(content)
111
 
112
+ print(combined_content)
113
+
114
+ parsed_content_list = '\n'.join(parsed_content_list)
115
+
116
+
117
  return image, str(parsed_content_list), str(combined_content)
118
 
119