Update inference.py
Browse files- inference.py +6 -2
inference.py
CHANGED
@@ -6,6 +6,10 @@ def load_model():
|
|
6 |
return model
|
7 |
|
8 |
def predict(model, inputs):
|
|
|
|
|
|
|
9 |
with torch.no_grad():
|
10 |
-
|
11 |
-
|
|
|
|
6 |
return model
|
7 |
|
8 |
def predict(model, inputs):
|
9 |
+
for itr, input in enumerate(inputs):
|
10 |
+
input = torch.tensor(input)
|
11 |
+
|
12 |
with torch.no_grad():
|
13 |
+
output = model(*inputs)
|
14 |
+
|
15 |
+
return output.numpy().tolist()
|