Download scripts/check_worker_version.py from Mohansree/bsure-api: direct link, hf CLI and curl.
- Browser
- Download file 481 Bytes
-
https://huggingface.co/spaces/Mohansree/bsure-api/resolve/main/scripts/check_worker_version.py
- Command line
-
hf download hf://spaces/Mohansree/bsure-api/scripts/check_worker_version.py
-
curl -L -o check_worker_version.py https://huggingface.co/spaces/Mohansree/bsure-api/resolve/main/scripts/check_worker_version.py
481 Bytes
| import requests | |
| def check_version(): | |
| try: | |
| with open("ai_url.txt", "r") as f: | |
| base_url = f.read().strip() | |
| except: | |
| print("No URL found") | |
| return | |
| print(f"Checking version at: {base_url}") | |
| try: | |
| res = requests.get(base_url, timeout=10) | |
| print(f"Status: {res.status_code}") | |
| print(f"Response: {res.json()}") | |
| except Exception as e: | |
| print(f"Error: {e}") | |
| if __name__ == "__main__": | |
| check_version() | |