Answer the question
In order to leave comments, you need to log in
How to run python code in WPF C#?
Hello, please advise. I couldn’t start PythonNet, so I would like to know if there are other options. I have a simple WPF application written in C#. I just need to load the trained model and use the .predict() method, and pull the result of the prediction into external code. Is there any way to implement this at all?
Answer the question
In order to leave comments, you need to log in
There are three options:
1. Run the python through Process.Start
2. Make a web application in python and request a prediction via HTTP
3. Export the model to onnx and use it directly in sharp using ml net
Try IronPython , here Run a particular Python function in C# with IronPython seems to be the answer to your question, with sample code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question