API_URL = "https://api-inference.huggingface.co/models/cwwierzbicki/autotrain-dogspeople2-1978966090" headers = {"Authorization": f"Bearer {API_TOKEN}"}

def query(filename): with open(filename, "rb") as f: data = f.read() response = requests.request("POST", API_URL, headers=headers, data=data) return json.loads(response.content.decode("utf-8"))

output = query("cats.jpg")