Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,7 +31,7 @@ col_class_names = ["hyperplastic", "adenomatous"]
|
|
| 31 |
|
| 32 |
# Histopathology DenseNet (stage classification)
|
| 33 |
hist_model = models.densenet121(weights=DenseNet121_Weights.IMAGENET1K_V1)
|
| 34 |
-
hist_model.classifier = nn.Linear(hist_model.classifier.in_features,
|
| 35 |
hist_model.load_state_dict(torch.load(hist_path, map_location=device))
|
| 36 |
hist_model = hist_model.to(device).eval()
|
| 37 |
hist_class_names = ["Not_specified", "Stage_I", "Stage_II", "Stage_IIA", "Stage_IIB", "Stage_III", "Stage_IIIA", "Stage_IIIB", "Stage_IIIC", "Stage_IV"]
|
|
|
|
| 31 |
|
| 32 |
# Histopathology DenseNet (stage classification)
|
| 33 |
hist_model = models.densenet121(weights=DenseNet121_Weights.IMAGENET1K_V1)
|
| 34 |
+
hist_model.classifier = nn.Linear(hist_model.classifier.in_features, 10) # adjust for your dataset
|
| 35 |
hist_model.load_state_dict(torch.load(hist_path, map_location=device))
|
| 36 |
hist_model = hist_model.to(device).eval()
|
| 37 |
hist_class_names = ["Not_specified", "Stage_I", "Stage_II", "Stage_IIA", "Stage_IIB", "Stage_III", "Stage_IIIA", "Stage_IIIB", "Stage_IIIC", "Stage_IV"]
|