Spaces:
Runtime error
Runtime error
File size: 358 Bytes
0cba43f |
1 2 3 4 5 6 7 8 9 10 |
import requests
API_URL = "https://api-inference.huggingface.co/models/CynthiaCR/emotions_classifier"
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() |