spacy_ner_v1 / app.py
brijw's picture
Create new file
4208e08
raw
history blame
386 Bytes
import requests
API_URL = "https://api-inference.huggingface.co/models/spacy/en_core_web_sm"
headers = {"Authorization": "Bearer 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"}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()
output = query({
"inputs": "where did Wandobire's laptop come from, was it africa or uganda?",
})