SuCicada commited on
Commit
ca15585
1 Parent(s): f76eec3
Files changed (3) hide show
  1. .gitignore +2 -0
  2. app.py +25 -0
  3. run.sh +17 -0
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ .idea
2
+ *.iml
app.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import subprocess
3
+ import sys
4
+
5
+
6
+ # Run shell command and capture output in real-time
7
+ def init():
8
+ process = subprocess.Popen("""
9
+ bash ./run.sh
10
+ """, stdout=subprocess.PIPE, shell=True)
11
+ while True:
12
+ output = process.stdout.readline().decode()
13
+ if output == '' and process.poll() is not None:
14
+ break
15
+ if output:
16
+ print(output.strip())
17
+
18
+ # Wait for the command to finish and get the return code
19
+ return_code = process.poll()
20
+ print(f"Command exited with return code {return_code}")
21
+
22
+
23
+ is_space = os.getenv("SYSTEM") == "spaces"
24
+ if is_space:
25
+ init()
run.sh ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ project=project
3
+ if [ -d "$project" ]; then
4
+ echo "$project already exists"
5
+ cd $project
6
+ git pull --recurse-submodules
7
+ git submodule update --recursive
8
+ git submodule sync
9
+ else
10
+ git clone https://github.com/SuCicada/so-vits-svc.git -b 4.1-Stable --recurse-submodules $project
11
+ cd $project
12
+ fi
13
+
14
+ pip install -r requirements_infer.txt
15
+ pip install sumake -U
16
+ sumake lain_download
17
+ USE_CONDA=false sumake lain_gradio_run