priyank-m commited on
Commit
2c3873c
1 Parent(s): 27e09f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -7,7 +7,7 @@ feature_extractor = ViTFeatureExtractor.from_pretrained("google/vit-large-patch3
7
 
8
  def run_ocr(image):
9
  pixel_values = feature_extractor(image, return_tensors="pt").pixel_values
10
- # autoregressively generate caption (uses greedy decoding by default)
11
  generated_ids = model.generate(pixel_values, max_new_tokens=50)
12
  generated_text = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
13
  return generated_text
 
7
 
8
  def run_ocr(image):
9
  pixel_values = feature_extractor(image, return_tensors="pt").pixel_values
10
+ # autoregressively generate caption (uses greedy decoding by default )
11
  generated_ids = model.generate(pixel_values, max_new_tokens=50)
12
  generated_text = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
13
  return generated_text