helloWorld199 commited on
Commit
e530855
·
verified ·
1 Parent(s): 3e80b7b

Update src/webui.py

Browse files
Files changed (1) hide show
  1. src/webui.py +10 -13
src/webui.py CHANGED
@@ -166,11 +166,10 @@ 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?duplicate=true)\n\n")
176
 
@@ -183,21 +182,19 @@ if __name__ == '__main__':
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():
 
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='ReVox') as app:
170
 
171
+ gr.Label('ReVox WebUI created with much much ❤️', show_label=False)
172
 
 
173
  gr.Markdown("Duplicate the space for use in private")
174
  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?duplicate=true)\n\n")
175
 
 
182
  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')
183
  ref_btn = gr.Button('Refresh Models 🔁', variant='primary')
184
 
 
 
 
 
185
  with gr.Column(visible=False) as file_upload_col:
186
+ main_vocals_input = gr.Text(label='main_vocals_input')
187
+ backup_vocals_input = gr.Text(label='backup_vocals_input')
188
+ main_vocals = gr.File(label='Audio file')
189
+ backup_vocals = gr.File(label='Backup Vocals')
190
+ main_vocals = gr.UploadButton('Upload Main Dereverbered vocals', file_types=['audio'], variant='primary')
191
+ main_vocals.upload(process_file_upload, inputs=[song_input_file], outputs=[main_vocals, main_vocals_input])
192
+ backup_vocals = gr.UploadButton('Upload backup vocals', file_types=['audio'], variant='primary')
193
+ backup_vocals.upload(process_file_upload, inputs=[song_input_file], outputs=[backup_vocals, backup_vocals_input])
194
 
195
  with gr.Column():
196
  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)')
197
  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)')
 
 
198
 
199
  with gr.Accordion('Voice conversion options', open=False):
200
  with gr.Row():