routing around image_preprocessing for urls

This commit is contained in:
Anne Carlson
2015-03-11 16:40:35 -04:00
parent f2b2311095
commit 8512401bc9
4 changed files with 29 additions and 7 deletions
+11 -1
View File
@@ -14,7 +14,7 @@ def api_handler(arg, cloud, api, batch=False, auth=None, **kwargs):
if cloud:
host = "%s.indico.domains" % cloud
else:
else:
# default to indico public cloud
host = config.PUBLIC_API_HOST
@@ -142,3 +142,13 @@ def image_preprocess(image, batch=False):
image = resize(image,(64,64))
image = image.tolist()
return image
def is_url(data, batch=False):
if batch and isinstance(data[0], basestring):
return True
if not batch and isinstance(data, basestring):
return True
return False