Spaces:
Sleeping
Sleeping
chandralegend
commited on
Commit
Β·
7075496
1
Parent(s):
698ece2
changed the inference
Browse files- .gitignore +1 -0
- utils/inference.py +3 -2
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
temp
|
utils/inference.py
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
import requests
|
2 |
|
3 |
-
API_URL = "https://api-inference.huggingface.co/models/
|
4 |
headers = {"Authorization": "Bearer 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"}
|
5 |
|
|
|
6 |
def query(filename):
|
7 |
with open(filename, "rb") as f:
|
8 |
data = f.read()
|
9 |
response = requests.post(API_URL, headers=headers, data=data)
|
10 |
-
return response.json()
|
|
|
1 |
import requests
|
2 |
|
3 |
+
API_URL = "https://api-inference.huggingface.co/models/trpakov/vit-face-expression"
|
4 |
headers = {"Authorization": "Bearer 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"}
|
5 |
|
6 |
+
|
7 |
def query(filename):
|
8 |
with open(filename, "rb") as f:
|
9 |
data = f.read()
|
10 |
response = requests.post(API_URL, headers=headers, data=data)
|
11 |
+
return response.json()
|