Update app.py
Browse filesAdd weights_only parameter for latest pytorch 2.6
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()
|