Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ import torch.nn as nn
|
|
9 |
import timm
|
10 |
|
11 |
REPO_ID = "Raaniel/model-smoke"
|
12 |
-
MODEL_FILE_NAME = "
|
13 |
USE_CUDA = torch.cuda.is_available()
|
14 |
num_classes = 3
|
15 |
|
@@ -32,7 +32,7 @@ model.classifier = nn.Sequential(
|
|
32 |
)
|
33 |
|
34 |
# Load the model weights
|
35 |
-
model.load_state_dict(state
|
36 |
|
37 |
# Move model to the appropriate device
|
38 |
device = torch.device('cuda' if USE_CUDA else 'cpu')
|
|
|
9 |
import timm
|
10 |
|
11 |
REPO_ID = "Raaniel/model-smoke"
|
12 |
+
MODEL_FILE_NAME = "best_model_epoch_32.pth"
|
13 |
USE_CUDA = torch.cuda.is_available()
|
14 |
num_classes = 3
|
15 |
|
|
|
32 |
)
|
33 |
|
34 |
# Load the model weights
|
35 |
+
model.load_state_dict(state)
|
36 |
|
37 |
# Move model to the appropriate device
|
38 |
device = torch.device('cuda' if USE_CUDA else 'cpu')
|