Spaces:
Build error
Build error
adding options to runtime initialization
Browse files
app.py
CHANGED
|
@@ -46,8 +46,9 @@ def load_model(model: str, activation: bool=True):
|
|
| 46 |
|
| 47 |
print(model)
|
| 48 |
|
| 49 |
-
|
| 50 |
-
|
|
|
|
| 51 |
|
| 52 |
return ort_session
|
| 53 |
|
|
|
|
| 46 |
|
| 47 |
print(model)
|
| 48 |
|
| 49 |
+
sess_options = ort.SessionOptions()
|
| 50 |
+
sess_options.intra_op_num_threads = 0
|
| 51 |
+
ort_session = ort.InferenceSession(model_path + '%s.onnx' % (model), sess_options)
|
| 52 |
|
| 53 |
return ort_session
|
| 54 |
|