Spaces:
Runtime error
Runtime error
Download src/preprocessing.py from Aishrica/SmartPlate: direct link, hf CLI and curl.
- Browser
- Download file 203 Bytes
-
https://huggingface.co/spaces/Aishrica/SmartPlate/resolve/main/src/preprocessing.py
- Command line
-
hf download hf://spaces/Aishrica/SmartPlate/src/preprocessing.py
-
curl -L -o preprocessing.py https://huggingface.co/spaces/Aishrica/SmartPlate/resolve/main/src/preprocessing.py
203 Bytes
| from pathlib import Path | |
| from PIL import Image | |
| def load_rgb_image(path: str | Path) -> Image.Image: | |
| """Load an image from disk and convert it to RGB.""" | |
| return Image.open(path).convert("RGB") | |