Blane187 commited on
Commit
dfcd80b
Β·
verified Β·
1 Parent(s): 9b3c8a2

Update src/webui.py

Browse files
Files changed (1) hide show
  1. 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='AICoverGenWebUI') as app:
170
-
171
- gr.Label('AICoverGen WebUI created with ❀️', show_label=False)
172
-
173
- gr.Markdown("AI-Cover-Gen-No-UI [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](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("[![Duplicate this Space](https://huggingface.co/datasets/huggingface/badges/raw/main/duplicate-this-space-sm-dark.svg)](https://huggingface.co/spaces/r3gm/AICoverGen_old_stable_cpu?duplicate=true)\n\n")
176
 
177
- # main tab
178
- with gr.Tab("Generate"):
179
 
180
- with gr.Accordion('Main Options'):
181
- with gr.Row():
182
- with gr.Column():
183
- 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')
184
- ref_btn = gr.Button('Refresh Models πŸ”', variant='primary')
 
 
 
185
 
186
- with gr.Column() as yt_link_col:
187
- 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')
188
- show_file_upload_button = gr.Button('Upload file instead')
189
 
190
- with gr.Column(visible=False) as file_upload_col:
191
- local_file = gr.File(label='Audio file')
192
- song_input_file = gr.UploadButton('Upload πŸ“‚', file_types=['audio'], variant='primary')
193
- show_yt_link_button = gr.Button('Paste YouTube link/Path to local file instead')
194
- song_input_file.upload(process_file_upload, inputs=[song_input_file], outputs=[local_file, song_input])
195
 
196
- with gr.Column():
197
- 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)')
198
- 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)')
199
- show_file_upload_button.click(swap_visibility, outputs=[file_upload_col, yt_link_col, song_input, local_file])
200
- show_yt_link_button.click(swap_visibility, outputs=[yt_link_col, file_upload_col, song_input, local_file])
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
- # Upload tab
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 [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](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)')