Nathanwit commited on
Commit
45f8c9c
β€’
1 Parent(s): ddbd464

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -12,7 +12,7 @@ tokenizer = AutoTokenizer.from_pretrained(decoder_checkpoint)
12
  model = VisionEncoderDecoderModel.from_pretrained(model_checkpoint).to(device)
13
 
14
 
15
- def predict(image,max_length=64, num_beams=4):
16
  image = image.convert('RGB')
17
  image = feature_extractor(image, return_tensors="pt").pixel_values.to(device)
18
  clean_text = lambda x: x.replace('<|endoftext|>','').split('\n')[0]
 
12
  model = VisionEncoderDecoderModel.from_pretrained(model_checkpoint).to(device)
13
 
14
 
15
+ def predict(image,max_length=24, num_beams=4):
16
  image = image.convert('RGB')
17
  image = feature_extractor(image, return_tensors="pt").pixel_values.to(device)
18
  clean_text = lambda x: x.replace('<|endoftext|>','').split('\n')[0]