priyank-m commited on
Commit
cc2dff7
1 Parent(s): 9a2b27a

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