Spaces:
Sleeping
Sleeping
File size: 358 Bytes
47c3daf 7075496 47c3daf 7075496 47c3daf 7075496 |
1 2 3 4 5 6 7 8 9 10 11 12 |
import requests
API_URL = "https://api-inference.huggingface.co/models/trpakov/vit-face-expression"
headers = {"Authorization": "Bearer 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"}
def query(filename):
with open(filename, "rb") as f:
data = f.read()
response = requests.post(API_URL, headers=headers, data=data)
return response.json()
|