ApsidalSolid4 commited on
Commit
35b0180
·
verified ·
1 Parent(s): f87a6a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -79,8 +79,8 @@ class TextClassifier:
79
  num_labels=2
80
  ).to(self.device)
81
 
82
- # Load your custom trained weights
83
- model_path = "/home/user/.cache/model_files/model.pt" # Adjust filename as needed
84
  if os.path.exists(model_path):
85
  logger.info(f"Loading custom model from {model_path}")
86
  checkpoint = torch.load(model_path, map_location=self.device)
 
79
  num_labels=2
80
  ).to(self.device)
81
 
82
+ # Look for model file in the same directory as the code
83
+ model_path = "model.pt" # Your model file should be uploaded as model.pt
84
  if os.path.exists(model_path):
85
  logger.info(f"Loading custom model from {model_path}")
86
  checkpoint = torch.load(model_path, map_location=self.device)