ACCC1380 commited on
Commit
42c7cbc
1 Parent(s): a4896ab

Upload lora-scripts/run_gui.ps1 with huggingface_hub

Browse files
Files changed (1) hide show
  1. lora-scripts/run_gui.ps1 +16 -5
lora-scripts/run_gui.ps1 CHANGED
@@ -1,6 +1,17 @@
1
- .\venv\Scripts\activate
2
-
3
- $Env:HF_HOME = "huggingface"
4
- $Env:PYTHONUTF8 = "1"
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