Update index.html
Browse files- index.html +3 -1
index.html
CHANGED
@@ -19,7 +19,9 @@ pipeline = transformers.pipeline
|
|
19 |
pipe = await pipeline('zero-shot-image-classification')
|
20 |
|
21 |
async def classify(image, classes):
|
22 |
-
|
|
|
|
|
23 |
if not classes:
|
24 |
return {}
|
25 |
data = await pipe(as_url(image), classes)
|
|
|
19 |
pipe = await pipeline('zero-shot-image-classification')
|
20 |
|
21 |
async def classify(image, classes):
|
22 |
+
if not image:
|
23 |
+
return {}
|
24 |
+
classes = [x for c in classes.split(",") if (x := c.strip())]
|
25 |
if not classes:
|
26 |
return {}
|
27 |
data = await pipe(as_url(image), classes)
|