Download scripts/check_gradio.py from Mohansree/bsure-api: direct link, hf CLI and curl.
- Browser
- Download file 738 Bytes
-
https://huggingface.co/spaces/Mohansree/bsure-api/resolve/main/scripts/check_gradio.py
- Command line
-
hf download hf://spaces/Mohansree/bsure-api/scripts/check_gradio.py
-
curl -L -o check_gradio.py https://huggingface.co/spaces/Mohansree/bsure-api/resolve/main/scripts/check_gradio.py
738 Bytes
| import gradio_client | |
| import inspect | |
| print(f"Gradio Client Version: {gradio_client.__version__}") | |
| try: | |
| sig = inspect.signature(gradio_client.Client.__init__) | |
| print(f"Client.__init__ params: {sig}") | |
| except Exception as e: | |
| print(f"Could not inspect signature: {e}") | |
| # Check if hf_token is valid | |
| try: | |
| print("Reading token...") | |
| with open("hf_token.txt", "r") as f: | |
| token = f.read().strip() | |
| print(f"Attempting to init Client with token={token[:5]}...") | |
| # Just init (without connection if possible? No, it connects. That's fine.) | |
| client = gradio_client.Client("yisol/IDM-VTON", token=token) | |
| print("✅ Client init success!") | |
| except Exception as e: | |
| print(f"❌ Client init failed: {e}") | |