bytchew commited on
Commit
a84117a
·
verified ·
1 Parent(s): e42d0f5

Changed modelWeights

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -35,7 +35,7 @@ print(f"took {(time.time() - start_time) / 60} minutes to load face_recognition"
35
  # return gr.Image(outputs[0])
36
 
37
  model_repo_id = "CSSE416-final-project/faceRecogModel"
38
- weight_file_id = "modelWeights100.bin"
39
 
40
 
41
  # 1. Load the model from Hugging Face Hub
@@ -44,7 +44,7 @@ def load_model(repo_id):
44
  weights_path = hf_hub_download(repo_id=model_repo_id, filename=weight_file_id)
45
 
46
  # Initialize the ResNet-18 architecture
47
- model = torchvision.models.resnet18(pretrained=True) # TODO: does it matter if this is set to true or false?
48
  num_ftrs = model.fc.in_features
49
  model.fc = nn.Linear(num_ftrs, 100) # Adjust for your task (e.g., 128 classes)
50
  # TODO: check if this number^^ corresponds to the number of classes
 
35
  # return gr.Image(outputs[0])
36
 
37
  model_repo_id = "CSSE416-final-project/faceRecogModel"
38
+ weight_file_id = "modelWeights101.bin"
39
 
40
 
41
  # 1. Load the model from Hugging Face Hub
 
44
  weights_path = hf_hub_download(repo_id=model_repo_id, filename=weight_file_id)
45
 
46
  # Initialize the ResNet-18 architecture
47
+ model = torchvision.models.resnet18(pretrained=False)
48
  num_ftrs = model.fc.in_features
49
  model.fc = nn.Linear(num_ftrs, 100) # Adjust for your task (e.g., 128 classes)
50
  # TODO: check if this number^^ corresponds to the number of classes