SuCicada commited on
Commit
11b682d
1 Parent(s): ca15585
Files changed (2) hide show
  1. app.py +25 -23
  2. app1.py +25 -0
app.py CHANGED
@@ -1,25 +1,27 @@
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()
 
1
+ import gradio as gr
2
+ # app = gr.Blocks()
3
+ # with app:
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
+ # demo.queue(concurrency_count=1022, max_size=2044) \
26
+ demo.launch(server_name="127.0.0.1",
27
+ share=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app1.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()