Skip to content

Commit d611301

Browse files
committed
fix typo
1 parent c3dfc9d commit d611301

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

modules/tabs/server.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import io
22
import json
3-
import os
43

54
import gradio as gr
65
import requests
76
import soundfile as sf
87
import torch.multiprocessing as multiprocessing
98
from scipy.io.wavfile import write
109

11-
from modules.shared import ROOT_DIR
1210
from modules.ui import Tab
1311
from server import app
1412

@@ -17,15 +15,15 @@
1715
def server_options_ui(show_out_dir=True):
1816
with gr.Row().style(equal_height=False):
1917
with gr.Row():
20-
host = gr.Textbox(value="127.0.0.1", label="RVC model file path")
21-
port = gr.Textbox(value="5001", label="Faiss index file path")
18+
host = gr.Textbox(value="127.0.0.1", label="host")
19+
port = gr.Textbox(value="5001", label="port")
2220
with gr.Row().style(equal_height=False):
2321
with gr.Row():
2422
rvc_model_file = gr.Textbox(value="", label="RVC model file path")
2523
faiss_index_file = gr.Textbox(value="", label="Faiss index file path")
2624
with gr.Row().style(equal_height=False):
2725
with gr.Row():
28-
input_voice_file = gr.Textbox(value="", label="convert voice file path")
26+
input_voice_file = gr.Textbox(value="", label="input voice file path")
2927
speaker_id = gr.Number(
3028
value=0,
3129
label="speaker_id",
@@ -45,8 +43,6 @@ def server_options_ui(show_out_dir=True):
4543
step=0.01,
4644
label="retrieval_feature_ratio",
4745
)
48-
49-
5046
return (
5147
host,
5248
port,
@@ -71,21 +67,10 @@ def sort(self):
7167

7268
def ui(self, outlet):
7369
def start(host, port):
74-
global proc
75-
7670
if multiprocessing.get_start_method() == 'fork':
7771
multiprocessing.set_start_method('spawn', force=True)
78-
#os.environ["PATH"] = (
79-
# os.path.join(ROOT_DIR, "bin")
80-
# + os.pathsep
81-
# + os.environ.get("PATH", "")
82-
#)
8372
proc = multiprocessing.Process(target = run, kwargs = {'host': host, 'port': port})
8473
proc.start()
85-
# デバッグ用
86-
# import subprocess
87-
# os.environ["FLASK_APP"] = os.path.join(ROOT_DIR, "server.py")
88-
# subprocess.Popen(f"flask run --host {host} --port {port}", shell=True)
8974
yield "start server"
9075

9176
def upload(host, port, rvc_model_file, faiss_index_file):

0 commit comments

Comments
 (0)