Spaces:
Runtime error
Runtime error
test
Browse files
app.py
CHANGED
@@ -1,26 +1,25 @@
|
|
1 |
-
import
|
2 |
-
|
3 |
-
|
4 |
-
with gr.Blocks() as demo:
|
5 |
-
gr.Markdown(value="""
|
6 |
-
<h1 style='text-align: center;'> Serial Experiments Lain </h1>
|
7 |
-
<h2 style='text-align: center;'> So-VITS-SVC 4.1-Stable WebUI 推理&训练 v2023.8.4 </h2>
|
8 |
-
""")
|
9 |
-
# todo
|
10 |
-
gr.Markdown(value="""
|
11 |
-
## 使用前先点击“加载模型”
|
12 |
-
|
13 |
-
本页面仓库:[SuCicada/so-vits-svc](https://github.com/SuCicada/so-vits-svc/tree/4.1-Stable)
|
14 |
-
|
15 |
-
Lain 中文交流频道:(待补充)
|
16 |
-
|
17 |
-
注意:本页面是为了推理Lain而准备的。其他完整功能请使用整合包,
|
18 |
-
|
19 |
-
代码参考:bilibili@麦哲云
|
20 |
-
|
21 |
-
[整合包,使用文档和常见报错解答](https://www.yuque.com/umoubuton/ueupp5)
|
22 |
-
""")
|
23 |
|
24 |
|
25 |
-
#
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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()
|
app1.py
DELETED
@@ -1,25 +0,0 @@
|
|
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()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|