Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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', [
|
|
|
|
|
|
|
|
|
|
| 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:
|