Araeynn commited on
Commit
efcf1fa
·
verified ·
1 Parent(s): 9bf1ba8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,8 +12,8 @@ def image_classifier(inp):
12
  hf = os.getenv("HF")
13
  r = asyncio.run(client.zero_shot_image_classification("why.png", candidate_labels=["mouth", "teeth", "not mouth"]))
14
  c = {}
15
- c[r[0]["label"]] = r[0]["score"]
16
- c[r[1]["label"]] = 1 - r[0]["score"]
17
  return c
18
 
19
 
 
12
  hf = os.getenv("HF")
13
  r = asyncio.run(client.zero_shot_image_classification("why.png", candidate_labels=["mouth", "teeth", "not mouth"]))
14
  c = {}
15
+ c[r[0]["label"]] = r[0]["score"] + r[1]["score"]
16
+ c[r[1]["label"]] = r[2]["score"]
17
  return c
18
 
19