Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -400,7 +400,7 @@ def generate(text_list, image_list, max_new_tokens, force_boi, force_bbox, force
|
|
400 |
if '<box_start>' in generated_text:
|
401 |
generated_text = re.sub(r'\[\[ <box_start>.*?<box_end>.*?\]\]', 'the green bounding box', generated_text)
|
402 |
else:
|
403 |
-
generated_text = re.sub(r'\
|
404 |
generated_text += IMG_FLAG
|
405 |
print(input_text + generated_text)
|
406 |
return {'text': generated_text, 'images': gen_imgs_base64_list, 'error_msg': error_msg}
|
|
|
400 |
if '<box_start>' in generated_text:
|
401 |
generated_text = re.sub(r'\[\[ <box_start>.*?<box_end>.*?\]\]', 'the green bounding box', generated_text)
|
402 |
else:
|
403 |
+
generated_text = re.sub(r'<loc-\d+> <loc-\d+> <loc-\d+> <loc-\d+> <box_end> \]\]', 'the green bounding box', generated_text)
|
404 |
generated_text += IMG_FLAG
|
405 |
print(input_text + generated_text)
|
406 |
return {'text': generated_text, 'images': gen_imgs_base64_list, 'error_msg': error_msg}
|