Geewook Kim commited on
Commit
4e85370
1 Parent(s): 5fa7b68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -35,7 +35,7 @@ if __name__ == "__main__":
35
  parser.add_argument("--pretrained_path", type=str, default="naver-clova-ix/donut-base-finetuned-cord-v2")
36
  parser.add_argument("--port", type=int, default=None)
37
  parser.add_argument("--url", type=str, default=None)
38
- parser.add_argument("--sample_img_path", type=str, default="./sample_cord_receipt(receipt_00004).png")
39
  args, left_argv = parser.parse_known_args()
40
 
41
  task_name = args.task
@@ -48,7 +48,7 @@ if __name__ == "__main__":
48
  if args.sample_img_path:
49
  example_sample.append(args.sample_img_path)
50
 
51
- pretrained_model = DonutModel.from_pretrained(args.pretrained_path, max_length=128)
52
  pretrained_model.encoder.to(torch.bfloat16)
53
  pretrained_model.eval()
54
 
 
35
  parser.add_argument("--pretrained_path", type=str, default="naver-clova-ix/donut-base-finetuned-cord-v2")
36
  parser.add_argument("--port", type=int, default=None)
37
  parser.add_argument("--url", type=str, default=None)
38
+ parser.add_argument("--sample_img_path", type=str)
39
  args, left_argv = parser.parse_known_args()
40
 
41
  task_name = args.task
 
48
  if args.sample_img_path:
49
  example_sample.append(args.sample_img_path)
50
 
51
+ pretrained_model = DonutModel.from_pretrained(args.pretrained_path)
52
  pretrained_model.encoder.to(torch.bfloat16)
53
  pretrained_model.eval()
54