Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -394,7 +394,7 @@ def generate(text_list, image_list, max_new_tokens, force_boi, force_bbox, force
|
|
394 |
if args.has_bbox:
|
395 |
bboxes = extract_box(generated_text)
|
396 |
if bboxes is not None and len(input_images) > 0:
|
397 |
-
image_viz = visualize_bbox(input_images[
|
398 |
image_base64 = encode_image(image_viz)
|
399 |
gen_imgs_base64_list.append(image_base64)
|
400 |
generated_text = re.sub(r'\[\[ <box_start>.*?<box_end>.*?\]\]', 'the green bounding box', generated_text)
|
|
|
394 |
if args.has_bbox:
|
395 |
bboxes = extract_box(generated_text)
|
396 |
if bboxes is not None and len(input_images) > 0:
|
397 |
+
image_viz = visualize_bbox(input_images[-1], bboxes)
|
398 |
image_base64 = encode_image(image_viz)
|
399 |
gen_imgs_base64_list.append(image_base64)
|
400 |
generated_text = re.sub(r'\[\[ <box_start>.*?<box_end>.*?\]\]', 'the green bounding box', generated_text)
|