Blane187 commited on
Commit
7a8f8e3
·
verified ·
1 Parent(s): 9858a52

update web + adjust typos

Browse files
Files changed (1) hide show
  1. app.py +43 -43
app.py CHANGED
@@ -11,6 +11,8 @@ with gr.Blocks(title="RVC V2",theme="Blane187/fuchsia") as app:
11
  with gr.TabItem("Inference"):
12
  with gr.Row():
13
  voice_model = gr.Dropdown(label="Model Voice", choices=sorted(names), value=lambda:sorted(names)[0] if len(sorted(names)) > 0 else '', interactive=True)
 
 
14
  refresh_button = gr.Button("Refresh", variant="primary")
15
  spk_item = gr.Slider(
16
  minimum=0,
@@ -55,27 +57,6 @@ with gr.Blocks(title="RVC V2",theme="Blane187/fuchsia") as app:
55
  inputs=[dropbox],
56
  outputs=[input_audio0])
57
  with gr.Column():
58
- with gr.Accordion("Change Index", open=False):
59
- file_index2 = gr.Dropdown(
60
- label="Change Index",
61
- choices=sorted(index_paths),
62
- interactive=True,
63
- value=sorted(index_paths)[0] if len(sorted(index_paths)) > 0 else ''
64
- )
65
- index_rate1 = gr.Slider(
66
- minimum=0,
67
- maximum=1,
68
- label="Index Strength",
69
- value=0.5,
70
- interactive=True,
71
- )
72
- f0_file = gr.File(label="F0 Path", visible=False)
73
- vc_output2 = gr.Audio(label="Output")
74
- with gr.Row():
75
- vc_output1 = gr.Textbox(label="Information")
76
- with gr.Row():
77
- but0 = gr.Button(value="Convert", variant="primary")
78
-
79
  with gr.Accordion("General Settings", open=False):
80
  f0method0 = gr.Radio(
81
  label="Method",
@@ -118,27 +99,45 @@ with gr.Blocks(title="RVC V2",theme="Blane187/fuchsia") as app:
118
  interactive=True,
119
  )
120
  if voice_model != None: vc.get_vc(voice_model.value,protect0,protect0)
121
- file_index1 = gr.Textbox(
122
- label="Index Path",
123
- interactive=True,
124
- visible=False#Not used here
125
- )
126
- refresh_button.click(
127
- fn=change_choices,
128
- inputs=[],
129
- outputs=[voice_model, file_index2],
130
- api_name="infer_refresh",
131
- )
132
- refresh_button.click(
133
- fn=lambda:{"choices":paths_for_files('audios'),"__type__":"update"}, #TODO check if properly returns a sorted list of audio files in the 'audios' folder that have the extensions '.wav', '.mp3', '.ogg', or '.flac'
134
- inputs=[],
135
- outputs = [input_audio0],
136
- )
137
- refresh_button.click(
138
- fn=lambda:{"value":paths_for_files('audios')[0],"__type__":"update"} if len(paths_for_files('audios')) > 0 else {"value":"","__type__":"update"}, #TODO check if properly returns a sorted list of audio files in the 'audios' folder that have the extensions '.wav', '.mp3', '.ogg', or '.flac'
139
- inputs=[],
140
- outputs = [input_audio0],
141
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
 
143
  but0.click(
144
  vc.vc_single,
@@ -177,6 +176,7 @@ with gr.Blocks(title="RVC V2",theme="Blane187/fuchsia") as app:
177
  )
178
  with gr.Row():
179
  model_browser = gr.Dropdown(choices=list(model_library.models.keys()),label="OR Search Models (Quality UNKNOWN)",scale=5)
 
180
  download_from_browser = gr.Button(value="Get",scale=2)
181
  download_from_browser.click(
182
  inputs=[model_browser],
@@ -219,7 +219,7 @@ with gr.Blocks(title="RVC V2",theme="Blane187/fuchsia") as app:
219
  label="dataset folder", value='dataset'
220
  )
221
  easy_uploader = gr.Files(label="Drop your audio files here",file_types=['audio'])
222
- with gr.Accordion(label="button if you don't set hyour training settings", open=False):
223
  but1 = gr.Button("1. Process", variant="primary")
224
  but2 = gr.Button("2. Extract Features", variant="primary")
225
  but4 = gr.Button("3. Train Index", variant="primary")
 
11
  with gr.TabItem("Inference"):
12
  with gr.Row():
13
  voice_model = gr.Dropdown(label="Model Voice", choices=sorted(names), value=lambda:sorted(names)[0] if len(sorted(names)) > 0 else '', interactive=True)
14
+ file_index2 = gr.Dropdown(label="Change Index",choices=sorted(index_paths), interactive=True,value=sorted(index_paths)[0] if len(sorted(index_paths)) > 0 else '')
15
+ with gr.Row():
16
  refresh_button = gr.Button("Refresh", variant="primary")
17
  spk_item = gr.Slider(
18
  minimum=0,
 
57
  inputs=[dropbox],
58
  outputs=[input_audio0])
59
  with gr.Column():
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  with gr.Accordion("General Settings", open=False):
61
  f0method0 = gr.Radio(
62
  label="Method",
 
99
  interactive=True,
100
  )
101
  if voice_model != None: vc.get_vc(voice_model.value,protect0,protect0)
102
+ file_index1 = gr.Textbox(
103
+ label="Index Path",
104
+ interactive=True,
105
+ visible=False#Not used here
106
+ )
107
+ refresh_button.click(
108
+ fn=change_choices,
109
+ inputs=[],
110
+ outputs=[voice_model, file_index2],
111
+ api_name="infer_refresh",
112
+ )
113
+ refresh_button.click(
114
+ fn=lambda:{"choices":paths_for_files('audios'),"__type__":"update"}, #TODO check if properly returns a sorted list of audio files in the 'audios' folder that have the extensions '.wav', '.mp3', '.ogg', or '.flac'
115
+ inputs=[],
116
+ outputs = [input_audio0],
117
+ )
118
+ refresh_button.click(
119
+ fn=lambda:{"value":paths_for_files('audios')[0],"__type__":"update"} if len(paths_for_files('audios')) > 0 else {"value":"","__type__":"update"}, #TODO check if properly returns a sorted list of audio files in the 'audios' folder that have the extensions '.wav', '.mp3', '.ogg', or '.flac'
120
+ inputs=[],
121
+ outputs = [input_audio0],
122
+ )
123
+ with gr.Accordion("Change Index", open=False):
124
+ index_rate1 = gr.Slider(
125
+ minimum=0,
126
+ maximum=1,
127
+ label="Index Strength",
128
+ value=0.5,
129
+ interactive=True,
130
+ )
131
+ with gr.Row():
132
+ f0_file = gr.File(label="F0 Path", visible=False)
133
+ with gr.Row():
134
+ vc_output2 = gr.Audio(label="Output", scale=5)
135
+ with gr.Row():
136
+ vc_output1 = gr.Textbox(label="Information")
137
+ with gr.Row():
138
+ but0 = gr.Button(value="Convert", variant="primary")
139
+
140
+
141
 
142
  but0.click(
143
  vc.vc_single,
 
176
  )
177
  with gr.Row():
178
  model_browser = gr.Dropdown(choices=list(model_library.models.keys()),label="OR Search Models (Quality UNKNOWN)",scale=5)
179
+ with gr.Row():
180
  download_from_browser = gr.Button(value="Get",scale=2)
181
  download_from_browser.click(
182
  inputs=[model_browser],
 
219
  label="dataset folder", value='dataset'
220
  )
221
  easy_uploader = gr.Files(label="Drop your audio files here",file_types=['audio'])
222
+ with gr.Accordion(label="button if you don't set your training settings", open=False):
223
  but1 = gr.Button("1. Process", variant="primary")
224
  but2 = gr.Button("2. Extract Features", variant="primary")
225
  but4 = gr.Button("3. Train Index", variant="primary")