Spaces:
Paused
Paused
Download space_checker.py from tastypear/Cerebras-API: direct link, hf CLI and curl.
- Browser
- Download file 221 Bytes
-
https://huggingface.co/spaces/tastypear/Cerebras-API/resolve/main/space_checker.py
- Command line
-
hf download hf://spaces/tastypear/Cerebras-API/space_checker.py
-
curl -L -o space_checker.py https://huggingface.co/spaces/tastypear/Cerebras-API/resolve/main/space_checker.py
221 Bytes
| import requests | |
| import time | |
| import os | |
| space_url = os.getenv('SPACE_URL') | |
| def fetch_url(url): | |
| response = requests.get(url) | |
| print(response.text) | |
| while True: | |
| fetch_url(space_url) | |
| time.sleep(60) |