merve HF staff commited on
Commit
32d3bb8
1 Parent(s): 3bf1911

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -38,7 +38,7 @@ def predict(image):
38
  outputs = model.generate(
39
  pixel_values.to(device),
40
  min_length=1,
41
- max_new_tokens=1000,
42
  bad_words_ids=[[processor.tokenizer.unk_token_id]],
43
  )
44
 
@@ -62,7 +62,7 @@ def inference(pdf_file, pdf_link):
62
  images = rasterize_paper(file_name, return_pil=True)
63
  sequence = ""
64
  # infer for every page and concat
65
- for image in images[0:2]:
66
  sequence += predict(image)
67
 
68
 
 
38
  outputs = model.generate(
39
  pixel_values.to(device),
40
  min_length=1,
41
+ max_new_tokens=1500,
42
  bad_words_ids=[[processor.tokenizer.unk_token_id]],
43
  )
44
 
 
62
  images = rasterize_paper(file_name, return_pil=True)
63
  sequence = ""
64
  # infer for every page and concat
65
+ for image in images:
66
  sequence += predict(image)
67
 
68