SakibRumu commited on
Commit
8b91a0e
·
verified ·
1 Parent(s): 01ecb88

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,12 +10,12 @@ if not os.path.exists('model'):
10
  os.makedirs('model')
11
 
12
  # Load the pre-trained model
13
- model = models.resnet50(weights=None)
14
  model.fc = torch.nn.Linear(2048, 7) # Adjust for the number of emotion categories
15
 
16
  # Load the model
17
  try:
18
- model.load_state_dict(torch.load('custom_resnet50_emotion_model.pth')) # Adjust the path if needed
19
  print("Model loaded successfully.")
20
  except FileNotFoundError:
21
  print("Model file not found. Please check the path.")
 
10
  os.makedirs('model')
11
 
12
  # Load the pre-trained model
13
+ model = models.seresnet50(weights=None)
14
  model.fc = torch.nn.Linear(2048, 7) # Adjust for the number of emotion categories
15
 
16
  # Load the model
17
  try:
18
+ model.load_state_dict(torch.load('custom_resnet50_emotion_model_full.pth')) # Adjust the path if needed
19
  print("Model loaded successfully.")
20
  except FileNotFoundError:
21
  print("Model file not found. Please check the path.")