Closed Jahongir780110 closed 1 year ago
From your code, actually you are almost there to make it works. If you see the docs, actually you can pass an options while running/executing your python code with the PythonShell.run
functions. To run your python code with an arguments, you can do it this way
PythonShell.run(
'../yolov7/detect.py',
{
args: ['--weights', 'yolov7.pt'],
},
function (err) {
if (err) throw err;
console.log('finished');
}
);
Thank you!
I want to run "python detect.py --weights yolov7.pt" command from node.js. My node.js code:
How can i pass --weights yolov7.pt?
I tried to run
But it didn't work