imthanhlv commited on
Commit
f9e87ac
·
1 Parent(s): 4ad89ee

fixed tokenizer

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -240,7 +240,7 @@ def inference(img, text, is_translate):
240
  # encode text
241
  if text is None:
242
  return "No text provided"
243
- text = clip_model.tokenize([text]).to(device)
244
  with torch.no_grad():
245
  prefix = clip_model.encode_text(text).to(device, dtype=torch.float32)
246
 
 
240
  # encode text
241
  if text is None:
242
  return "No text provided"
243
+ text = clip.tokenize([text]).to(device)
244
  with torch.no_grad():
245
  prefix = clip_model.encode_text(text).to(device, dtype=torch.float32)
246