Spaces:
Sleeping
Sleeping
update this broken shiit
Browse files
app.py
CHANGED
@@ -80,7 +80,16 @@ def process(
|
|
80 |
ocr_bbox_rslt, is_goal_filtered = check_ocr_box(image_save_path, display_img = False, output_bb_format='xyxy', goal_filtering=None, easyocr_args={'paragraph': False, 'text_threshold':0.9}, use_paddleocr=True)
|
81 |
text, ocr_bbox = ocr_bbox_rslt
|
82 |
# print('prompt:', prompt)
|
83 |
-
dino_labled_img, label_coordinates, parsed_content_list = get_som_labeled_img(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
image = Image.open(io.BytesIO(base64.b64decode(dino_labled_img)))
|
85 |
print('finish processing')
|
86 |
|
|
|
80 |
ocr_bbox_rslt, is_goal_filtered = check_ocr_box(image_save_path, display_img = False, output_bb_format='xyxy', goal_filtering=None, easyocr_args={'paragraph': False, 'text_threshold':0.9}, use_paddleocr=True)
|
81 |
text, ocr_bbox = ocr_bbox_rslt
|
82 |
# print('prompt:', prompt)
|
83 |
+
dino_labled_img, label_coordinates, parsed_content_list = get_som_labeled_img(image_path, som_model,
|
84 |
+
BOX_TRESHOLD = BOX_TRESHOLD,
|
85 |
+
output_coord_in_ratio=False,
|
86 |
+
ocr_bbox=ocr_bbox,
|
87 |
+
draw_bbox_config=draw_bbox_config,
|
88 |
+
caption_model_processor=caption_model_processor,
|
89 |
+
ocr_text=text,
|
90 |
+
use_local_semantics=True,
|
91 |
+
iou_threshold=0.1)
|
92 |
+
|
93 |
image = Image.open(io.BytesIO(base64.b64decode(dino_labled_img)))
|
94 |
print('finish processing')
|
95 |
|