mirror of
https://github.com/wassname/IndicoIo-python.git
synced 2026-08-02 12:20:18 +08:00
15 lines
387 B
Python
15 lines
387 B
Python
import json
|
|
|
|
import requests
|
|
import numpy as np
|
|
|
|
from IndicoIo import JSON_HEADERS
|
|
|
|
base_url = lambda c: "http://indico.io/api/%s" % c
|
|
|
|
def facial_features(face):
|
|
data_dict = json.dumps({"face": face})
|
|
response = requests.post(base_url("facialfeatures"), data=data_dict, headers=JSON_HEADERS)
|
|
response_dict = json.loads(response.content)
|
|
return response_dict['response']
|