Download HumeBatch.py from testdump1/confusion: direct link, hf CLI and curl.
- Browser
- Download file 657 Bytes
-
https://huggingface.co/testdump1/confusion/resolve/main/HumeBatch.py
- Command line
-
hf download hf://testdump1/confusion/HumeBatch.py
-
curl -L -o HumeBatch.py https://huggingface.co/testdump1/confusion/resolve/main/HumeBatch.py
657 Bytes
| from hume import HumeBatchClient | |
| from hume.models.config import FaceConfig | |
| newTimeOut = 3000 | |
| client = HumeBatchClient("<your-api-key-here>", timeout=newTimeOut) | |
| files = ["/Users/jetlin/Desktop/HackMercedWorkshops/HumeRunthrough/humerunthroughpicture.jpg"] | |
| configs = [FaceConfig(identify_faces=True)] | |
| job = client.submit_job(urls=[], configs=configs, files=files) | |
| print(job) | |
| print("Running...") | |
| job.await_complete() | |
| job.download_predictions("predictions.json") | |
| print("Predictions downloaded to predictions.json") | |
| job.download_artifacts("artifacts.zip") | |
| print("Artifacts downloaded to artifacts.zip") | |
| print(job.get_predictions()) |