AdhamQQ commited on
Commit
a94d467
·
verified ·
1 Parent(s): 8096d7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -34,12 +34,11 @@ def download_models():
34
  stroke_model = load_model("cnn_stroke_model.keras")
35
 
36
 
37
- pain_model = resnet18(weights=None)
38
- pain_model.fc = nn.Linear(pain_model.fc.in_features, 1)
39
- pain_model.load_state_dict(torch.load("pain_model.pth", map_location=torch.device("cpu")))
40
- pain_model.eval()
41
 
42
- st.write("✅ Models loaded.")
43
 
44
  return stroke_model, pain_model
45
 
 
34
  stroke_model = load_model("cnn_stroke_model.keras")
35
 
36
 
37
+ pain_model = resnet18(weights=None)
38
+ pain_model.fc = nn.Linear(pain_model.fc.in_features, 1)
39
+ pain_model.load_state_dict(torch.load("pain_model.pth", map_location=torch.device("cpu")))
40
+ pain_model.eval()
41
 
 
42
 
43
  return stroke_model, pain_model
44