sudo-paras-shah commited on
Commit
f47d362
·
verified ·
1 Parent(s): af253de

Update app.py

Browse files

Add weights_only parameter for latest pytorch 2.6

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -16,7 +16,7 @@ gc.enable()
16
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
17
 
18
  with st.spinner("Loading PointNet++ model..."):
19
- checkpoint = torch.load('checkpoints/best_model.pth', map_location=torch.device(device))
20
  classifier = pn2.get_model(num_class=4, normal_channel=False)
21
  classifier.load_state_dict(checkpoint['model_state_dict'])
22
  classifier.eval()
 
16
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
17
 
18
  with st.spinner("Loading PointNet++ model..."):
19
+ checkpoint = torch.load('checkpoints/best_model.pth', map_location=torch.device(device), weights_only=True)
20
  classifier = pn2.get_model(num_class=4, normal_channel=False)
21
  classifier.load_state_dict(checkpoint['model_state_dict'])
22
  classifier.eval()