karan99300 commited on
Commit
80c2f4a
·
verified ·
1 Parent(s): bb7453c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -19,8 +19,8 @@ model=CNNtoRNN(embed_size=256,hidden_size=256,vocab_size=len(dataset.vocab),num_
19
  model.load_state_dict(torch.load(filepath,map_location='cpu'))
20
  model.eval()
21
 
22
- def launch(Image_Address):
23
- im=Image.open(requests.get(Image_Address,stream=True).raw)
24
  image=transform(im.convert('RGB')).unsqueeze(0)
25
 
26
  output=model.caption_image(image,dataset.vocab)
 
19
  model.load_state_dict(torch.load(filepath,map_location='cpu'))
20
  model.eval()
21
 
22
+ def launch(input):
23
+ im=Image.open(requests.get(input,stream=True).raw)
24
  image=transform(im.convert('RGB')).unsqueeze(0)
25
 
26
  output=model.caption_image(image,dataset.vocab)