miguelflores-0906 commited on
Commit
b70ebda
·
1 Parent(s): b6323a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -9,13 +9,15 @@ def snap(image, video):
9
  onnx_model = onnx.load("M-Raw.onnx")
10
  text = onnx.checker.check_model(onnx_model)
11
  print("The model is checked")
12
- return [image, text]
 
 
13
 
14
 
15
  demo = gr.Interface(
16
  snap,
17
  [gr.Image(source="webcam", tool=None, streaming=True)],
18
- ["image", "text"],
19
  )
20
 
21
  if __name__ == "__main__":
 
9
  onnx_model = onnx.load("M-Raw.onnx")
10
  text = onnx.checker.check_model(onnx_model)
11
  print("The model is checked")
12
+ ort_sess = ort.InferenceSession(onnx_model)
13
+ output = ort_sess.run(None, image)
14
+ return [output]
15
 
16
 
17
  demo = gr.Interface(
18
  snap,
19
  [gr.Image(source="webcam", tool=None, streaming=True)],
20
+ ["image"],
21
  )
22
 
23
  if __name__ == "__main__":