Skip to content

Commit 9f2dc91

Browse files
committed
more terse
1 parent 9ad451a commit 9f2dc91

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

gradio_demo.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,10 @@ def process(
7474
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=True, ocr_bbox=ocr_bbox,draw_bbox_config=draw_bbox_config, caption_model_processor=caption_model_processor, ocr_text=text,iou_threshold=iou_threshold)
7575
image = Image.open(io.BytesIO(base64.b64decode(dino_labled_img)))
7676
print('finish processing')
77-
combined_text_output = json.dumps({
77+
return image, json.dumps({
7878
"parsed_content_list": parsed_content_list,
7979
"label_coordinates": label_coordinates,
8080
}, indent=2)
81-
return image, combined_text_output
8281

8382

8483

0 commit comments

Comments
 (0)