Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
from web import *
|
2 |
import gradio as gr
|
3 |
import os
|
4 |
-
|
5 |
-
|
6 |
-
|
|
|
7 |
|
8 |
assets_folder = "./assets/"
|
9 |
if not os.path.exists(assets_folder):
|
@@ -71,7 +72,24 @@ with gr.Blocks(title="RVC UI") as app:
|
|
71 |
label="Output information",
|
72 |
interactive=False
|
73 |
)
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
with gr.TabItem("Train"):
|
76 |
gr.Markdown("### Step 1. Fill in the experimental configuration.\nExperimental data is stored in the 'logs' folder, with each experiment having a separate folder. Manually enter the experiment name path, which contains the experimental configuration, logs, and trained model files.")
|
77 |
exp_dir1 = gr.Textbox(label="Enter the experiment name", value="my voice")
|
|
|
1 |
from web import *
|
2 |
import gradio as gr
|
3 |
import os
|
4 |
+
import shutil, glob
|
5 |
+
from easyfuncs import download_from_url, CachedModels
|
6 |
+
os.makedirs("dataset",exist_ok=True)
|
7 |
+
model_library = CachedModels()
|
8 |
|
9 |
assets_folder = "./assets/"
|
10 |
if not os.path.exists(assets_folder):
|
|
|
72 |
label="Output information",
|
73 |
interactive=False
|
74 |
)
|
75 |
+
with gr.TabItem("Download Models"):
|
76 |
+
with gr.Row():
|
77 |
+
url_input = gr.Textbox(label="URL to model", value="",placeholder="https://...", scale=6)
|
78 |
+
name_output = gr.Textbox(label="Save as", value="",placeholder="MyModel",scale=2)
|
79 |
+
url_download = gr.Button(value="Download Model",scale=2)
|
80 |
+
url_download.click(
|
81 |
+
inputs=[url_input,name_output],
|
82 |
+
outputs=[url_input],
|
83 |
+
fn=download_from_url,
|
84 |
+
)
|
85 |
+
with gr.Row():
|
86 |
+
model_browser = gr.Dropdown(choices=list(model_library.models.keys()),label="OR Search Models (Quality UNKNOWN)",scale=5)
|
87 |
+
download_from_browser = gr.Button(value="Get",scale=2)
|
88 |
+
download_from_browser.click(
|
89 |
+
inputs=[model_browser],
|
90 |
+
outputs=[model_browser],
|
91 |
+
fn=lambda model: download_from_url(model_library.models[model],model),
|
92 |
+
)
|
93 |
with gr.TabItem("Train"):
|
94 |
gr.Markdown("### Step 1. Fill in the experimental configuration.\nExperimental data is stored in the 'logs' folder, with each experiment having a separate folder. Manually enter the experiment name path, which contains the experimental configuration, logs, and trained model files.")
|
95 |
exp_dir1 = gr.Textbox(label="Enter the experiment name", value="my voice")
|