Spaces:
Running
Running
Update src/webui.py
Browse files- src/webui.py +26 -30
src/webui.py
CHANGED
@@ -166,38 +166,34 @@ if __name__ == '__main__':
|
|
166 |
with open(os.path.join(rvc_models_dir, 'public_models.json'), encoding='utf8') as infile:
|
167 |
public_models = json.load(infile)
|
168 |
|
169 |
-
with gr.Blocks(title='
|
170 |
-
|
171 |
-
gr.Label('AICoverGen WebUI created with β€οΈ', show_label=False)
|
172 |
-
|
173 |
-
gr.Markdown("AI-Cover-Gen-No-UI [](https://colab.research.google.com/github/ardha27/AICoverGen-NoUI-Colab/blob/main/CoverGen_No_UI.ipynb)")
|
174 |
-
gr.Markdown("Duplicate the space for use in private")
|
175 |
-
gr.Markdown("[](https://huggingface.co/spaces/r3gm/AICoverGen_old_stable_cpu?duplicate=true)\n\n")
|
176 |
|
177 |
-
|
178 |
-
with gr.Tab("Generate"):
|
179 |
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
|
|
|
|
|
|
185 |
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
|
202 |
with gr.Accordion('Voice conversion options', open=False):
|
203 |
with gr.Row():
|
@@ -254,10 +250,10 @@ if __name__ == '__main__':
|
|
254 |
model_zip_link = gr.Text(label='Download link to model', info='Should be a zip file containing a .pth model file and an optional .index file.')
|
255 |
model_name = gr.Text(label='Name your model', info='Give your new model a unique name from your other voice models.')
|
256 |
|
|
|
257 |
with gr.Row():
|
258 |
-
download_btn = gr.Button('Download π', variant='primary', scale=19)
|
259 |
dl_output_message = gr.Text(label='Output Message', interactive=False, scale=20)
|
260 |
-
|
261 |
download_btn.click(download_online_model, inputs=[model_zip_link, model_name], outputs=dl_output_message)
|
262 |
|
263 |
gr.Markdown('## Input Examples')
|
@@ -299,7 +295,7 @@ if __name__ == '__main__':
|
|
299 |
filter_tags.change(filter_models, inputs=[filter_tags, search_query], outputs=public_models_table)
|
300 |
download_pub_btn.click(download_online_model, inputs=[pub_zip_link, pub_model_name], outputs=pub_dl_output_message)
|
301 |
|
302 |
-
|
303 |
with gr.Tab('Upload model'):
|
304 |
gr.Markdown('## Upload locally trained RVC v2 model and index file')
|
305 |
gr.Markdown('- Find model file (weights folder) and optional index file (logs/[name] folder)')
|
|
|
166 |
with open(os.path.join(rvc_models_dir, 'public_models.json'), encoding='utf8') as infile:
|
167 |
public_models = json.load(infile)
|
168 |
|
169 |
+
with gr.Blocks(title='AICoverGenHexWebUI', theme="nevreal/orange") as app:
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
|
171 |
+
gr.Label('CoverGen-RVC HEX MOD WebUI created with β€οΈ', show_label=False)
|
|
|
172 |
|
173 |
+
gr.Markdown("CoverGen-No-UI [](https://colab.research.google.com/github/ardha27/AICoverGen-NoUI-Colab/blob/main/CoverGen_No_UI.ipynb)")
|
174 |
+
|
175 |
+
# main tab
|
176 |
+
with gr.Tab("Inference"):
|
177 |
+
with gr.Row():
|
178 |
+
with gr.Column():
|
179 |
+
rvc_model = gr.Dropdown(voice_models, label='Voice Models', info='Models folder "AICoverGen --> rvc_models". After new models are added into this folder, click the refresh button')
|
180 |
+
ref_btn = gr.Button('Refresh Models π', variant='primary')
|
181 |
|
182 |
+
with gr.Column() as yt_link_col:
|
183 |
+
song_input = gr.Text(label='Song input', info='Link to a song on YouTube or full path to a local file. For file upload, click the button below. Example: https://www.youtube.com/watch?v=M-mtdN6R3bQ')
|
184 |
+
show_file_upload_button = gr.Button('Upload file instead')
|
185 |
|
186 |
+
with gr.Column(visible=False) as file_upload_col:
|
187 |
+
local_file = gr.File(label='Audio file')
|
188 |
+
song_input_file = gr.UploadButton('Upload π', file_types=['audio'], variant='primary')
|
189 |
+
show_yt_link_button = gr.Button('Paste YouTube link/Path to local file instead')
|
190 |
+
song_input_file.upload(process_file_upload, inputs=[song_input_file], outputs=[local_file, song_input])
|
191 |
|
192 |
+
with gr.Column():
|
193 |
+
pitch = gr.Slider(-3, 3, value=0, step=1, label='Pitch Change (Vocals ONLY)', info='Generally, use 1 for male to female conversions and -1 for vice-versa. (Octaves)')
|
194 |
+
pitch_all = gr.Slider(-12, 12, value=0, step=1, label='Overall Pitch Change', info='Changes pitch/key of vocals and instrumentals together. Altering this slightly reduces sound quality. (Semitones)')
|
195 |
+
show_file_upload_button.click(swap_visibility, outputs=[file_upload_col, yt_link_col, song_input, local_file])
|
196 |
+
show_yt_link_button.click(swap_visibility, outputs=[yt_link_col, file_upload_col, song_input, local_file])
|
197 |
|
198 |
with gr.Accordion('Voice conversion options', open=False):
|
199 |
with gr.Row():
|
|
|
250 |
model_zip_link = gr.Text(label='Download link to model', info='Should be a zip file containing a .pth model file and an optional .index file.')
|
251 |
model_name = gr.Text(label='Name your model', info='Give your new model a unique name from your other voice models.')
|
252 |
|
253 |
+
download_btn = gr.Button('Download π', variant='primary', scale=19)
|
254 |
with gr.Row():
|
|
|
255 |
dl_output_message = gr.Text(label='Output Message', interactive=False, scale=20)
|
256 |
+
|
257 |
download_btn.click(download_online_model, inputs=[model_zip_link, model_name], outputs=dl_output_message)
|
258 |
|
259 |
gr.Markdown('## Input Examples')
|
|
|
295 |
filter_tags.change(filter_models, inputs=[filter_tags, search_query], outputs=public_models_table)
|
296 |
download_pub_btn.click(download_online_model, inputs=[pub_zip_link, pub_model_name], outputs=pub_dl_output_message)
|
297 |
|
298 |
+
|
299 |
with gr.Tab('Upload model'):
|
300 |
gr.Markdown('## Upload locally trained RVC v2 model and index file')
|
301 |
gr.Markdown('- Find model file (weights folder) and optional index file (logs/[name] folder)')
|