brijw commited on
Commit
4208e08
1 Parent(s): 4c11e12

Create new file

Browse files
Files changed (1) hide show
  1. app.py +12 -0
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
+ })