Spaces:
Sleeping
Sleeping
Download test_api.py from Bhaskr/Age-Synthesis: direct link, hf CLI and curl.
- Browser
- Download file 333 Bytes
-
https://huggingface.co/spaces/Bhaskr/Age-Synthesis/resolve/main/test_api.py
- Command line
-
hf download hf://spaces/Bhaskr/Age-Synthesis/test_api.py
-
curl -L -o test_api.py https://huggingface.co/spaces/Bhaskr/Age-Synthesis/resolve/main/test_api.py
333 Bytes
| from gradio_client import Client | |
| import os | |
| def test_api(): | |
| print("Connecting to D-X-Lab/Face-Aging...") | |
| try: | |
| client = Client("D-X-Lab/Face-Aging") | |
| print("API Endpoints:") | |
| client.view_api() | |
| except Exception as e: | |
| print(f"Failed to connect: {e}") | |
| if __name__ == "__main__": | |
| test_api() | |