confusion / HumeBatch.py
testdump1's picture
Upload 9 files
93aed6f verified
raw
history blame contribute delete
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())