Upload lora-scripts/run_gui.ps1 with huggingface_hub
Browse files- lora-scripts/run_gui.ps1 +16 -5
lora-scripts/run_gui.ps1
CHANGED
@@ -1,6 +1,17 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
python gui.py
|
|
|
1 |
+
$Env:HF_HOME = "huggingface"
|
2 |
+
$Env:PYTHONUTF8 = "1"
|
3 |
+
|
4 |
+
if (Test-Path -Path "venv\Scripts\activate") {
|
5 |
+
Write-Host -ForegroundColor green "Activating virtual environment..."
|
6 |
+
.\venv\Scripts\activate
|
7 |
+
}
|
8 |
+
elseif (Test-Path -Path "python\python.exe") {
|
9 |
+
Write-Host -ForegroundColor green "Using python from python folder..."
|
10 |
+
$py_path = (Get-Item "python").FullName
|
11 |
+
$env:PATH = "$py_path;$env:PATH"
|
12 |
+
}
|
13 |
+
else {
|
14 |
+
Write-Host -ForegroundColor Blue "No virtual environment found, using system python..."
|
15 |
+
}
|
16 |
+
|
17 |
python gui.py
|