Update inference.py
Browse files- inference.py +1 -1
inference.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import torch
|
| 2 |
from model import * # import extracted model classes
|
| 3 |
|
| 4 |
-
def load_model(weights_path="
|
| 5 |
if device is None:
|
| 6 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 7 |
# Replace 'YourModelClass' with the actual class name from model.py
|
|
|
|
| 1 |
import torch
|
| 2 |
from model import * # import extracted model classes
|
| 3 |
|
| 4 |
+
def load_model(weights_path="model.pt", device=None):
|
| 5 |
if device is None:
|
| 6 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 7 |
# Replace 'YourModelClass' with the actual class name from model.py
|