Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -65,7 +65,7 @@ def load_model(checkpoint_path, d_args):
|
|
| 65 |
model = Model(d_args)
|
| 66 |
try:
|
| 67 |
# Load checkpoint
|
| 68 |
-
checkpoint = torch.load(checkpoint_path, map_location=torch.device("cpu"))
|
| 69 |
model.load_state_dict(checkpoint)
|
| 70 |
print(f"Model_{i} loaded successfully.")
|
| 71 |
except Exception as e:
|
|
|
|
| 65 |
model = Model(d_args)
|
| 66 |
try:
|
| 67 |
# Load checkpoint
|
| 68 |
+
checkpoint = torch.load(checkpoint_path[i], map_location=torch.device("cpu"))
|
| 69 |
model.load_state_dict(checkpoint)
|
| 70 |
print(f"Model_{i} loaded successfully.")
|
| 71 |
except Exception as e:
|