mirror of
https://github.com/wassname/IndicoIo-python.git
synced 2026-07-03 17:10:05 +08:00
13 lines
307 B
Python
13 lines
307 B
Python
import json
|
|
|
|
import requests
|
|
import numpy as np
|
|
from IndicoIo import JSON_HEADERS
|
|
|
|
base_url = "http://indico.io/api/fer/classify"
|
|
|
|
def fer(face):
|
|
data_dict = json.dumps({"image": face})
|
|
response = requests.post(base_url, data=data_dict, headers=JSON_HEADERS)
|
|
return json.loads(response.content)
|