check point
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
namespace Hawkeye.VisionBuilder.Workflow.DataTransfer;
|
||||
|
||||
public static class PythonModelProxy
|
||||
{
|
||||
|
||||
private static bool _isInitialized = false;
|
||||
private static PythonScriptRunner _pythonScriptRunner;
|
||||
private static CSharpDataTransferMQ _cSharpDataTransfer;
|
||||
|
||||
public static void Initialize(string pythonPath, string scriptFile= "Hawkeye.ModelLoader.py")
|
||||
{
|
||||
if (_isInitialized) return;
|
||||
if (!File.Exists(pythonPath)) return;
|
||||
_isInitialized = true;
|
||||
|
||||
var relativePath = @"..\Data\AI";
|
||||
var absolutePath = Path.GetFullPath(relativePath);
|
||||
_cSharpDataTransfer = new CSharpDataTransferMQ();
|
||||
_pythonScriptRunner = new PythonScriptRunner(pythonPath, scriptFile, absolutePath);
|
||||
_pythonScriptRunner.Start();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static CSharpDataTransferMQ GetInterface()
|
||||
{
|
||||
if (!_isInitialized) return null;
|
||||
return _cSharpDataTransfer;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user