Vageesh1 commited on
Commit
d058d78
1 Parent(s): 7d2b892

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -14,7 +14,7 @@ model_trained.load_state_dict(torch.load('model_trained.pth',map_location=torch.
14
  image_processor = ViTImageProcessor.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
15
  tokenizer = GPT2TokenizerFast.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
16
 
17
- def show_n_generate(img, greedy = True, model):
18
  image = Image.open(img)
19
  pixel_values = image_processor(image, return_tensors ="pt").pixel_values
20
  plt.imshow(np.asarray(image))
 
14
  image_processor = ViTImageProcessor.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
15
  tokenizer = GPT2TokenizerFast.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
16
 
17
+ def show_n_generate(img, model, greedy = True):
18
  image = Image.open(img)
19
  pixel_values = image_processor(image, return_tensors ="pt").pixel_values
20
  plt.imshow(np.asarray(image))