Update index.html
Browse files- index.html +1 -1
index.html
CHANGED
@@ -19,7 +19,7 @@ pipeline = transformers.pipeline
|
|
19 |
pipe = await pipeline('zero-shot-image-classification')
|
20 |
|
21 |
async def classify(image, classes):
|
22 |
-
data = await pipe(as_url(image), classes.split(","))
|
23 |
result = {item['label']: round(item['score'], 2) for item in data}
|
24 |
return result
|
25 |
|
|
|
19 |
pipe = await pipeline('zero-shot-image-classification')
|
20 |
|
21 |
async def classify(image, classes):
|
22 |
+
data = await pipe(as_url(image), [c for c in classes.split(",") if c])
|
23 |
result = {item['label']: round(item['score'], 2) for item in data}
|
24 |
return result
|
25 |
|