Spaces:
Sleeping
Sleeping
Update utils/basic_functions.py
Browse files- utils/basic_functions.py +1 -1
utils/basic_functions.py
CHANGED
|
@@ -130,7 +130,7 @@ def huggingface_detect_id_box(model_name,url):
|
|
| 130 |
response_string = processor.decode(output[0][2:],skip_special_tokens=True)
|
| 131 |
print(f"response_string: {response_string}")
|
| 132 |
|
| 133 |
-
bbox = re.search(r"ASSISTANT: \[(.*?)\]",
|
| 134 |
bbox = [image.size[0],image.size[1],image.size[0],image.size[1]]*ast.literal_eval([bbox])
|
| 135 |
print(f"bbox: {bbox}")
|
| 136 |
|
|
|
|
| 130 |
response_string = processor.decode(output[0][2:],skip_special_tokens=True)
|
| 131 |
print(f"response_string: {response_string}")
|
| 132 |
|
| 133 |
+
bbox = re.search(r"ASSISTANT: \[(.*?)\]",response_string)
|
| 134 |
bbox = [image.size[0],image.size[1],image.size[0],image.size[1]]*ast.literal_eval([bbox])
|
| 135 |
print(f"bbox: {bbox}")
|
| 136 |
|