ADD: Tests for accepting filename and b64 inputs

This commit is contained in:
Chris Lee
2015-05-28 15:47:32 -04:00
committed by Madison May
parent dd09f34a89
commit ea3f77cbf0
3 changed files with 24 additions and 2 deletions
+1
View File
@@ -24,6 +24,7 @@ def facial_features(image, cloud=None, batch=False, api_key=None, **kwargs):
:type image: list of lists
:rtype: List containing feature responses
"""
image = image_preprocess(image, batch=batch)
return api_handler(image, cloud=cloud, api="facialfeatures", batch=batch, api_key=api_key, **kwargs)
def image_features(image, cloud=None, batch=False, api_key=None, **kwargs):
+2 -2
View File
@@ -1,6 +1,6 @@
import requests
from indicoio.utils import api_handler
from indicoio.utils import api_handler, image_preprocess
import indicoio.config as config
def fer(image, cloud=None, batch=False, api_key=None, **kwargs):
@@ -26,5 +26,5 @@ def fer(image, cloud=None, batch=False, api_key=None, **kwargs):
:type image: list of lists
:rtype: Dictionary containing emotion probability pairs
"""
image = image_preprocess(image, batch=batch)
return api_handler(image, cloud=cloud, api="fer", batch=batch, api_key=api_key, **kwargs)