All checks were successful
RIA Hub Workflow Demo / ria-demo (push) Successful in 2m45s
26 lines
576 B
Python
26 lines
576 B
Python
import subprocess
|
|
from helpers.app_settings import get_app_settings
|
|
|
|
settings = get_app_settings()
|
|
|
|
input_path = "onnx_files/inference_recognition_model.onnx"
|
|
optimization_style = settings.app.optimization_style
|
|
target_platform = settings.app.target_platform
|
|
|
|
# Build the command
|
|
command = [
|
|
"python",
|
|
"-m",
|
|
"onnxruntime.tools.convert_onnx_models_to_ort",
|
|
input_path,
|
|
"--output_dir",
|
|
"ort_files",
|
|
"--optimization_style",
|
|
optimization_style,
|
|
"--target_platform",
|
|
target_platform,
|
|
]
|
|
|
|
# Run the command
|
|
subprocess.run(command, check=True)
|