Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -71,7 +71,10 @@ input_size = 768 + metadata_features # featurizer output size + metadata size
|
|
71 |
log_reg = LogisticRegressionTorch(input_dim=input_size, output_dim=N_UNIQUE_CLASSES)
|
72 |
|
73 |
# Load Weights
|
74 |
-
|
|
|
|
|
|
|
75 |
weights = torch.load(model_weights_path, map_location=torch.device('cpu'))
|
76 |
|
77 |
base_model.load_state_dict(weights['model_state_dict'])
|
|
|
71 |
log_reg = LogisticRegressionTorch(input_dim=input_size, output_dim=N_UNIQUE_CLASSES)
|
72 |
|
73 |
# Load Weights
|
74 |
+
import os
|
75 |
+
|
76 |
+
# Get the model path from the environment variable
|
77 |
+
model_path = os.getenv('MODEL_PATH')
|
78 |
weights = torch.load(model_weights_path, map_location=torch.device('cpu'))
|
79 |
|
80 |
base_model.load_state_dict(weights['model_state_dict'])
|