diff options
| author | yum <yum.food.vr@gmail.com> | 2025-07-24 18:13:33 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-07-24 18:13:33 -0700 |
| commit | 9a699c784501ed0d3c62a3485c898a3794580c48 (patch) | |
| tree | 1201c51df23b87171fc9518706af96f0169d4387 /ui/index.js | |
| parent | 8368883ca3c280d0e6b3b2b69c12ab76edead1fc (diff) | |
Switch to embedded python
Diffstat (limited to 'ui/index.js')
| -rw-r--r-- | ui/index.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ui/index.js b/ui/index.js index e11e3aa..f166534 100644 --- a/ui/index.js +++ b/ui/index.js @@ -31,10 +31,9 @@ const REQUIRED_DLLS = [ 'cudnn_ops64_9.dll' ]; -// Helper function to get the correct Python executable from venv +// Helper function to get the correct Python executable from embedded python function getVenvPython() { - const venvPath = path.join(APP_ROOT, 'venv'); - const pythonPath = path.join(venvPath, 'Scripts', 'python.exe'); + const pythonPath = path.join(APP_ROOT, 'python', 'python.exe'); return pythonPath; } @@ -48,7 +47,7 @@ function sendPythonOutput(message, type = 'stdout') { // Helper function to create environment with DLL path function createPythonEnvironment() { const dllPath = path.join(APP_ROOT, 'dll'); - const binPath = path.join(APP_ROOT, 'venv', 'Scripts'); + const binPath = path.join(APP_ROOT, 'python', 'Scripts'); const env = {}; env.PATH = `${dllPath};${binPath}`; env.HF_HUB_DISABLE_SYMLINKS_WARNING = '1'; @@ -146,7 +145,7 @@ function setupProcessHandlers(process) { }); } -// Helper function to execute Python commands using venv +// Helper function to execute Python commands using embedded python function executePythonCommand(args, options = {}) { return new Promise((resolve, reject) => { const pythonPath = getVenvPython(); |
