Spaces:
Sleeping
Sleeping
Download app/utils.py from Sudhansh26/model: direct link, hf CLI and curl.
- Browser
- Download file 172 Bytes
-
https://huggingface.co/spaces/Sudhansh26/model/resolve/main/app/utils.py
- Command line
-
hf download hf://spaces/Sudhansh26/model/app/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/Sudhansh26/model/resolve/main/app/utils.py
172 Bytes
| import cv2 | |
| import numpy as np | |
| def read_image(data): | |
| """Read image from bytes data.""" | |
| return cv2.imdecode(np.frombuffer(data, np.uint8), cv2.IMREAD_COLOR) | |