Spaces:
Sleeping
Sleeping
Download src/data/request_method.py from velmurugan1122/Clip_Image_Search: direct link, hf CLI and curl.
- Browser
- Download file 173 Bytes
-
https://huggingface.co/spaces/velmurugan1122/Clip_Image_Search/resolve/main/src/data/request_method.py
- Command line
-
hf download hf://spaces/velmurugan1122/Clip_Image_Search/src/data/request_method.py
-
curl -L -o request_method.py https://huggingface.co/spaces/velmurugan1122/Clip_Image_Search/resolve/main/src/data/request_method.py
173 Bytes
| import requests | |
| from PIL import Image | |
| def get_urlimage(image_url): | |
| response = requests.get(image_url, stream=True).raw | |
| image = Image.open(response) | |
| return image |