Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ app = FastAPI()
|
|
18 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
19 |
|
20 |
def load_model():
|
21 |
-
config = read_params(config_path)
|
22 |
model = timm.create_model('convnext_base.clip_laiona', pretrained=True, num_classes=3)
|
23 |
model_state_dict = torch.load('model.pth', map_location=device)
|
24 |
model.load_state_dict(model_state_dict)
|
|
|
18 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
19 |
|
20 |
def load_model():
|
21 |
+
# config = read_params(config_path)
|
22 |
model = timm.create_model('convnext_base.clip_laiona', pretrained=True, num_classes=3)
|
23 |
model_state_dict = torch.load('model.pth', map_location=device)
|
24 |
model.load_state_dict(model_state_dict)
|