Update app.py
Browse files
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 = {
|