Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ def image_classifier(inp):
|
|
10 |
inp.save("why.png")
|
11 |
sunflower_path = "why.png"
|
12 |
hf = os.getenv("HF")
|
13 |
-
r = asyncio.run(client.zero_shot_image_classification("why.png", candidate_labels=["mouth", "other"])
|
14 |
c = {}
|
15 |
c[r[0]["label"]] = r[0]["score"]
|
16 |
c[r[1]["label"]] = 1 - r[0]["score"]
|
|
|
10 |
inp.save("why.png")
|
11 |
sunflower_path = "why.png"
|
12 |
hf = os.getenv("HF")
|
13 |
+
r = asyncio.run(client.zero_shot_image_classification("why.png", candidate_labels=["mouth", "other"]))
|
14 |
c = {}
|
15 |
c[r[0]["label"]] = r[0]["score"]
|
16 |
c[r[1]["label"]] = 1 - r[0]["score"]
|