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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -244,7 +244,7 @@ def inference(img,model_name):
244
  model = model.to(device)
245
 
246
  use_beam_search = False
247
- image = io.imread(img.name)
248
  pil_image = PIL.Image.fromarray(image)
249
  image = preprocess(pil_image).unsqueeze(0).to(device)
250
  with torch.no_grad():
 
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():