Spaces:
Runtime error
Runtime error
Create new file
Browse files
app.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import requests
|
2 |
+
|
3 |
+
API_URL = "https://api-inference.huggingface.co/models/spacy/en_core_web_sm"
|
4 |
+
headers = {"Authorization": "Bearer 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"}
|
5 |
+
|
6 |
+
def query(payload):
|
7 |
+
response = requests.post(API_URL, headers=headers, json=payload)
|
8 |
+
return response.json()
|
9 |
+
|
10 |
+
output = query({
|
11 |
+
"inputs": "where did Wandobire's laptop come from, was it africa or uganda?",
|
12 |
+
})
|