chandralegend commited on
Commit
7075496
β€’
1 Parent(s): 698ece2

changed the inference

Browse files
Files changed (2) hide show
  1. .gitignore +1 -0
  2. 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/CynthiaCR/emotions_classifier"
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()