Spaces:
Sleeping
Sleeping
Download app/utils.py from MaroWael/deployment: direct link, hf CLI and curl.
- Browser
- Download file 193 Bytes
-
https://huggingface.co/spaces/MaroWael/deployment/resolve/main/app/utils.py
- Command line
-
hf download hf://spaces/MaroWael/deployment/app/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/MaroWael/deployment/resolve/main/app/utils.py
193 Bytes
| # app/utils.py | |
| from PIL import Image | |
| import io | |
| def read_image(img_file): | |
| image_bytes = img_file.file.read() | |
| image = Image.open(io.BytesIO(image_bytes)).convert("RGB") | |
| return image | |