spuuntries
commited on
Commit
•
3197cb6
1
Parent(s):
10e0c75
fix!: set weights_only to false
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ if not os.path.exists(model_path):
|
|
39 |
|
40 |
# Load the trained model
|
41 |
model = ViTForImageClassification.from_pretrained(
|
42 |
-
model_path, config=config, ignore_mismatched_sizes=True
|
43 |
)
|
44 |
model.classifier = nn.Linear(model.config.hidden_size, 2)
|
45 |
model.to(device)
|
|
|
39 |
|
40 |
# Load the trained model
|
41 |
model = ViTForImageClassification.from_pretrained(
|
42 |
+
model_path, config=config, ignore_mismatched_sizes=True, weights_only=False
|
43 |
)
|
44 |
model.classifier = nn.Linear(model.config.hidden_size, 2)
|
45 |
model.to(device)
|