Update app.py
Browse files
app.py
CHANGED
@@ -79,8 +79,8 @@ class TextClassifier:
|
|
79 |
num_labels=2
|
80 |
).to(self.device)
|
81 |
|
82 |
-
#
|
83 |
-
model_path = "
|
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)
|