Spaces:
Running
Running
update
Browse files
app.py
CHANGED
@@ -45,12 +45,12 @@ embeddings = torch.load('embeddings.pt')
|
|
45 |
|
46 |
# Configure
|
47 |
options = onnxruntime.SessionOptions()
|
48 |
-
options.intra_op_num_threads =
|
49 |
-
options.inter_op_num_threads =
|
50 |
|
51 |
# Load model
|
52 |
PATH = 'model_onnx.onnx'
|
53 |
-
ort_session = onnxruntime.InferenceSession(PATH)
|
54 |
input_name = ort_session.get_inputs()[0].name
|
55 |
|
56 |
|
|
|
45 |
|
46 |
# Configure
|
47 |
options = onnxruntime.SessionOptions()
|
48 |
+
options.intra_op_num_threads = 8
|
49 |
+
options.inter_op_num_threads = 8
|
50 |
|
51 |
# Load model
|
52 |
PATH = 'model_onnx.onnx'
|
53 |
+
ort_session = onnxruntime.InferenceSession(PATH, sess_options=options)
|
54 |
input_name = ort_session.get_inputs()[0].name
|
55 |
|
56 |
|