Spaces:
Sleeping
Sleeping
Copy deployment files to gradio branch
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ from transforms import resized_crop_pad, gpu_crop
|
|
7 |
from torchvision.transforms import Normalize, ToTensor
|
8 |
|
9 |
model = get_model()
|
10 |
-
state = torch.load("
|
11 |
apply_weights(model, state, copy_weight)
|
12 |
|
13 |
to_tensor = ToTensor()
|
|
|
7 |
from torchvision.transforms import Normalize, ToTensor
|
8 |
|
9 |
model = get_model()
|
10 |
+
state = torch.load("./vit_saved.pth", map_location="cpu")
|
11 |
apply_weights(model, state, copy_weight)
|
12 |
|
13 |
to_tensor = ToTensor()
|