Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ from io import BytesIO
|
|
10 |
app = FastAPI()
|
11 |
|
12 |
# Load the model
|
13 |
-
MODEL_PATH = "https://huggingface.co/yolac/BacterialMorphologyClassification/
|
14 |
model = models.mobilenet_v2(weights=None)
|
15 |
model.classifier[1] = nn.Linear(model.last_channel, 3)
|
16 |
model.load_state_dict(torch.hub.load_state_dict_from_url(MODEL_PATH, map_location=torch.device('cpu')))
|
|
|
10 |
app = FastAPI()
|
11 |
|
12 |
# Load the model
|
13 |
+
MODEL_PATH = "https://huggingface.co/yolac/BacterialMorphologyClassification/resolve/main/model.pth"
|
14 |
model = models.mobilenet_v2(weights=None)
|
15 |
model.classifier[1] = nn.Linear(model.last_channel, 3)
|
16 |
model.load_state_dict(torch.hub.load_state_dict_from_url(MODEL_PATH, map_location=torch.device('cpu')))
|