From 9a699c784501ed0d3c62a3485c898a3794580c48 Mon Sep 17 00:00:00 2001 From: yum Date: Thu, 24 Jul 2025 18:13:33 -0700 Subject: Switch to embedded python --- ui/index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'ui/index.js') 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(); -- cgit v1.2.3