mnh commited on
Commit
6d848c4
·
1 Parent(s): af94a82
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -16,7 +16,7 @@ def predict(image):
16
  image = converter.enhance(0.5)
17
  image = image.convert("L")
18
  image = preprocess(image).unsqueeze(0).to(device)
19
- text = clip.tokenize([f"a character of origin {c}" for c in labels]).to(device)
20
 
21
  with torch.inference_mode():
22
  logits_per_image, logits_per_text = model(image, text)
 
16
  image = converter.enhance(0.5)
17
  image = image.convert("L")
18
  image = preprocess(image).unsqueeze(0).to(device)
19
+ text = clip.tokenize([f"a character of origin: {c}" for c in labels]).to(device)
20
 
21
  with torch.inference_mode():
22
  logits_per_image, logits_per_text = model(image, text)