Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,7 +26,7 @@ def predict_dr(image):
|
|
| 26 |
try:
|
| 27 |
# Load model (you'll need to update this path)
|
| 28 |
model = create_model()
|
| 29 |
-
model.load_state_dict(torch.load('
|
| 30 |
model.eval()
|
| 31 |
|
| 32 |
# Preprocess image
|
|
|
|
| 26 |
try:
|
| 27 |
# Load model (you'll need to update this path)
|
| 28 |
model = create_model()
|
| 29 |
+
model.load_state_dict(torch.load('diabeticRetinopathy.pth', map_location=torch.device('cpu')))
|
| 30 |
model.eval()
|
| 31 |
|
| 32 |
# Preprocess image
|