Commit
·
10395db
1
Parent(s):
8cc8d3d
Update app.py
Browse files
app.py
CHANGED
@@ -21,8 +21,9 @@ def snap(image):
|
|
21 |
image = np.asarray(image, dtype=np.float32)/255
|
22 |
print(image)
|
23 |
print("-----------")
|
|
|
24 |
ort_sess = ort.InferenceSession("M-Raw.onnx")
|
25 |
-
output = ort_sess.run(["output0"], {"images":
|
26 |
return [output]
|
27 |
|
28 |
|
|
|
21 |
image = np.asarray(image, dtype=np.float32)/255
|
22 |
print(image)
|
23 |
print("-----------")
|
24 |
+
image = image[np.newaxis, ...].transpose((0,3,1,2))
|
25 |
ort_sess = ort.InferenceSession("M-Raw.onnx")
|
26 |
+
output = ort_sess.run(["output0"], {"images": image})
|
27 |
return [output]
|
28 |
|
29 |
|