rath1108 commited on
Commit
2045f4d
·
verified ·
1 Parent(s): 52b18a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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, 4) # 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"]
 
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"]