mawairon commited on
Commit
db9f444
1 Parent(s): 87ab4ff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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
- model_weights_path = 'gena-blastln-bs33-lr4e-05-S168.pth'
 
 
 
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'])