manu02 commited on
Commit
97397b1
·
verified ·
1 Parent(s): 97bc6d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -95,7 +95,10 @@ def create_classifier(checkpoint_path, model_id="facebook/dinov3-vits16-pretrain
95
  device = device or ('cuda' if torch.cuda.is_available() else 'cpu')
96
  print(f"Loading Classifier from {checkpoint_path}...")
97
  checkpoint = torch.load(checkpoint_path, map_location=device, weights_only=False)
98
- label_cols = checkpoint.get('label_cols', ["Class_1", "Class_2"])
 
 
 
99
 
100
  base_model = AutoModel.from_pretrained(model_id).to(device)
101
  if 'base_model_state_dict' in checkpoint:
 
95
  device = device or ('cuda' if torch.cuda.is_available() else 'cpu')
96
  print(f"Loading Classifier from {checkpoint_path}...")
97
  checkpoint = torch.load(checkpoint_path, map_location=device, weights_only=False)
98
+ label_cols = checkpoint.get('label_cols', [
99
+ "Cardiomegaly", "Consolidation", "Edema",
100
+ "Atelectasis", "Pleural Effusion", "No Findings"
101
+ ])
102
 
103
  base_model = AutoModel.from_pretrained(model_id).to(device)
104
  if 'base_model_state_dict' in checkpoint: