Raaniel commited on
Commit
6d1b15c
·
verified ·
1 Parent(s): 9a2938c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 = "model_smoke.pt"
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['weights'])
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')