Unify webui to single webui
This commit is contained in:
@@ -14,7 +14,6 @@ from pathlib import Path
|
||||
import gradio as gr
|
||||
import yaml
|
||||
|
||||
from common.constants import GRADIO_THEME, LATEST_VERSION
|
||||
from common.log import logger
|
||||
from common.stdout_wrapper import SAFE_STDOUT
|
||||
from common.subprocess_utils import run_script_with_log, second_elem_of
|
||||
@@ -398,9 +397,7 @@ def run_tensorboard(model_name):
|
||||
yield gr.Button("Tensorboardを開く")
|
||||
|
||||
|
||||
initial_md = f"""
|
||||
# Style-Bert-VITS2 ver {LATEST_VERSION} 学習用WebUI
|
||||
|
||||
how_to_md = f"""
|
||||
## 使い方
|
||||
|
||||
- データを準備して、モデル名を入力して、必要なら設定を調整してから、「自動前処理を実行」ボタンを押してください。進捗状況等はターミナルに表示されます。
|
||||
@@ -452,10 +449,11 @@ english_teacher.wav|Mary|EN|How are you? I'm fine, thank you, and you?
|
||||
|
||||
|
||||
def create_train_app():
|
||||
with gr.Blocks(theme=GRADIO_THEME).queue() as app:
|
||||
gr.Markdown(initial_md)
|
||||
with gr.Accordion(label="データの前準備", open=False):
|
||||
gr.Markdown(prepare_md)
|
||||
with gr.Blocks().queue() as app:
|
||||
with gr.Accordion("使い方", open=False):
|
||||
gr.Markdown(how_to_md)
|
||||
with gr.Accordion(label="データの前準備", open=False):
|
||||
gr.Markdown(prepare_md)
|
||||
model_name = gr.Textbox(label="モデル名")
|
||||
gr.Markdown("### 自動前処理")
|
||||
with gr.Row(variant="panel"):
|
||||
@@ -794,20 +792,5 @@ def create_train_app():
|
||||
outputs=[use_jp_extra_train],
|
||||
)
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
"--server-name",
|
||||
type=str,
|
||||
default=None,
|
||||
help="Server name for Gradio app",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--no-autolaunch",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="Do not launch app automatically",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
# app.launch(inbrowser=not args.no_autolaunch, server_name=args.server_name)
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user