ahmedmbutt commited on
Commit
6ce53d5
1 Parent(s): 7ed6692

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -244,8 +244,7 @@ def inference(img,model_name):
244
  model = model.to(device)
245
 
246
  use_beam_search = False
247
- image = io.imread(img)
248
- pil_image = PIL.Image.fromarray(image)
249
  image = preprocess(pil_image).unsqueeze(0).to(device)
250
  with torch.no_grad():
251
  prefix = clip_model.encode_image(image).to(device, dtype=torch.float32)
 
244
  model = model.to(device)
245
 
246
  use_beam_search = False
247
+ pil_image = PIL.Image.fromarray(img)
 
248
  image = preprocess(pil_image).unsqueeze(0).to(device)
249
  with torch.no_grad():
250
  prefix = clip_model.encode_image(image).to(device, dtype=torch.float32)