kakasher commited on
Commit
a00a922
·
1 Parent(s): 5a72e50

changed load weights_only to false

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -36,7 +36,7 @@ model = None
36
  # Load model
37
  try:
38
  model = timm.create_model('vit_base_patch16_224', pretrained=False, num_classes=47)
39
- model.load_state_dict(torch.load(model_path, weights_only=True))
40
  model.eval()
41
  except Exception as e:
42
  print(f"Error loading model: {str(e)}")
@@ -96,4 +96,4 @@ demo = gr.Interface(
96
  )
97
 
98
  if __name__ == "__main__":
99
- demo.launch()
 
36
  # Load model
37
  try:
38
  model = timm.create_model('vit_base_patch16_224', pretrained=False, num_classes=47)
39
+ model.load_state_dict(torch.load(model_path, weights_only=False))
40
  model.eval()
41
  except Exception as e:
42
  print(f"Error loading model: {str(e)}")
 
96
  )
97
 
98
  if __name__ == "__main__":
99
+ demo.launch()