Tennineee commited on
Commit
c7202d2
·
verified ·
1 Parent(s): 4079cdc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -45,6 +45,7 @@ parser = argparse.ArgumentParser('PDFNet Testing script', parents=[get_args_pars
45
  args = parser.parse_args(args=[])
46
  model,model_name = build_model(args)
47
  model_path = hf_hub_download(repo_id="Tennineee/PDFNet",filename="PDFNet_Best.pth", repo_type="model")
 
48
  model = model.to(device).eval()
49
 
50
  DAMV2_configs = {
 
45
  args = parser.parse_args(args=[])
46
  model,model_name = build_model(args)
47
  model_path = hf_hub_download(repo_id="Tennineee/PDFNet",filename="PDFNet_Best.pth", repo_type="model")
48
+ model.load_state_dict(torch.load(model_path,map_location='cpu'),strict=False)
49
  model = model.to(device).eval()
50
 
51
  DAMV2_configs = {