Spaces:
Running on Zero
Running on Zero
Download API_EXAMPLE.py from SammySnake/BEV: direct link, hf CLI and curl.
- Browser
- Download file 695 Bytes
-
https://huggingface.co/spaces/SammySnake/BEV/resolve/main/API_EXAMPLE.py
- Command line
-
hf download hf://spaces/SammySnake/BEV/API_EXAMPLE.py
-
curl -L -o API_EXAMPLE.py https://huggingface.co/spaces/SammySnake/BEV/resolve/main/API_EXAMPLE.py
695 Bytes
| """pip install gradio-client; replace image paths with your non-sensitive inputs.""" | |
| from gradio_client import Client, handle_file | |
| client = Client("SammySnake/BEV") | |
| print(client.predict(api_name="/status")) | |
| # BEV is a feature grid, not an aerial photograph or a coordinate estimate. | |
| # preview, raw_npz, receipt = client.predict( | |
| # handle_file("ground.jpg"), 60, 0, 0, "cpu", api_name="/bev" | |
| # ) | |
| # vector_json, raw_npz = client.predict( | |
| # handle_file("ground.jpg"), "ground", "cpu", api_name="/embed" | |
| # ) | |
| # ranking_json, raw_npz = client.predict( | |
| # handle_file("ground.jpg"), | |
| # [handle_file("candidate-1.jpg"), handle_file("candidate-2.jpg")], | |
| # "cpu", api_name="/rank" | |
| # ) | |