Spaces:
Running
Running
Update utils/basic_functions.py
Browse files- utils/basic_functions.py +1 -1
utils/basic_functions.py
CHANGED
|
@@ -123,7 +123,7 @@ def huggingface_detect_id_box(model_name,url):
|
|
| 123 |
draw = ImageDraw.Draw(image)
|
| 124 |
draw.rectangle(bbox,outline="red",width=5)
|
| 125 |
#image.save(f'{os.path.dirname(os.path.dirname(os.path.abspath(__file__)))}\\download\\{dt.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")}.jpg')
|
| 126 |
-
return image
|
| 127 |
except Exception as e:
|
| 128 |
print(f"Error loading model or processing image: {str(e)}")
|
| 129 |
return None
|
|
|
|
| 123 |
draw = ImageDraw.Draw(image)
|
| 124 |
draw.rectangle(bbox,outline="red",width=5)
|
| 125 |
#image.save(f'{os.path.dirname(os.path.dirname(os.path.abspath(__file__)))}\\download\\{dt.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")}.jpg')
|
| 126 |
+
return image,bbox
|
| 127 |
except Exception as e:
|
| 128 |
print(f"Error loading model or processing image: {str(e)}")
|
| 129 |
return None
|