Politrees commited on
Commit
51d335b
1 Parent(s): c6c1cfe

Update src/covergen.py

Browse files
Files changed (1) hide show
  1. src/covergen.py +6 -6
src/covergen.py CHANGED
@@ -43,7 +43,7 @@ if __name__ == '__main__':
43
 
44
  with gr.Column(scale=2, variant='panel'):
45
  with gr.Group():
46
- local_file = gr.Audio(label='Аудио-файл', interactive=False, show_download_button=False)
47
  uploaded_file = gr.UploadButton(label='Загрузить аудио-файл', file_types=['audio'], variant='primary')
48
  uploaded_file.upload(process_file_upload, inputs=[uploaded_file], outputs=[local_file])
49
  uploaded_file.upload(update_button_text, outputs=[uploaded_file])
@@ -51,7 +51,7 @@ if __name__ == '__main__':
51
  with gr.Group():
52
  with gr.Row(variant='panel'):
53
  generate_btn = gr.Button("Генерировать", variant='primary', scale=1)
54
- converted_voice = gr.Audio(label='Преобразованный голос', scale=5)
55
  output_format = gr.Dropdown(['mp3', 'flac', 'wav'], value='mp3', label='Формат файла', scale=0.1, allow_custom_value=False, filterable=False)
56
 
57
  with gr.Accordion('Настройки преобразования голоса', open=False):
@@ -77,14 +77,14 @@ if __name__ == '__main__':
77
  with gr.Row(equal_height=False):
78
  with gr.Column(variant='panel'):
79
  with gr.Group():
80
- vocal_audio = gr.Audio(label='Вокал', interactive=False, show_download_button=False)
81
  upload_vocal_audio = gr.UploadButton(label='Загрузить вокал', file_types=['audio'], variant='primary')
82
  upload_vocal_audio.upload(process_file_upload, inputs=[upload_vocal_audio], outputs=[vocal_audio])
83
  upload_vocal_audio.upload(update_button_text_voc, outputs=[upload_vocal_audio])
84
 
85
  with gr.Column(variant='panel'):
86
  with gr.Group():
87
- instrumental_audio = gr.Audio(label='Инструментал', interactive=False, show_download_button=False)
88
  upload_instrumental_audio = gr.UploadButton(label='Загрузить инструментал', file_types=['audio'], variant='primary')
89
  upload_instrumental_audio.upload(process_file_upload, inputs=[upload_instrumental_audio], outputs=[instrumental_audio])
90
  upload_instrumental_audio.upload(update_button_text_inst, outputs=[upload_instrumental_audio])
@@ -178,7 +178,7 @@ if __name__ == '__main__':
178
  download_btn.click(download_from_url, inputs=[model_zip_link, model_name], outputs=dl_output_message)
179
 
180
  with gr.Tab('Загрузить локально'):
181
- with gr.Row():
182
  with gr.Column(variant='panel'):
183
  zip_file = gr.File(label='Zip-файл', file_types=['.zip'], file_count='single')
184
  with gr.Column(variant='panel'):
@@ -192,4 +192,4 @@ if __name__ == '__main__':
192
  local_upload_output_message = gr.Text(label='Сообщение вывода', interactive=False)
193
  model_upload_button.click(upload_zip_model, inputs=[zip_file, local_model_name], outputs=local_upload_output_message)
194
 
195
- app.launch(share=True, quiet=True)
 
43
 
44
  with gr.Column(scale=2, variant='panel'):
45
  with gr.Group():
46
+ local_file = gr.Audio(label='Аудио-файл', interactive=False, show_download_button=False, show_share_button=False)
47
  uploaded_file = gr.UploadButton(label='Загрузить аудио-файл', file_types=['audio'], variant='primary')
48
  uploaded_file.upload(process_file_upload, inputs=[uploaded_file], outputs=[local_file])
49
  uploaded_file.upload(update_button_text, outputs=[uploaded_file])
 
51
  with gr.Group():
52
  with gr.Row(variant='panel'):
53
  generate_btn = gr.Button("Генерировать", variant='primary', scale=1)
54
+ converted_voice = gr.Audio(label='Преобразованный голос', scale=5, show_share_button=False)
55
  output_format = gr.Dropdown(['mp3', 'flac', 'wav'], value='mp3', label='Формат файла', scale=0.1, allow_custom_value=False, filterable=False)
56
 
57
  with gr.Accordion('Настройки преобразования голоса', open=False):
 
77
  with gr.Row(equal_height=False):
78
  with gr.Column(variant='panel'):
79
  with gr.Group():
80
+ vocal_audio = gr.Audio(label='Вокал', interactive=False, show_download_button=False, show_share_button=False)
81
  upload_vocal_audio = gr.UploadButton(label='Загрузить вокал', file_types=['audio'], variant='primary')
82
  upload_vocal_audio.upload(process_file_upload, inputs=[upload_vocal_audio], outputs=[vocal_audio])
83
  upload_vocal_audio.upload(update_button_text_voc, outputs=[upload_vocal_audio])
84
 
85
  with gr.Column(variant='panel'):
86
  with gr.Group():
87
+ instrumental_audio = gr.Audio(label='Инструментал', interactive=False, show_download_button=False, show_share_button=False)
88
  upload_instrumental_audio = gr.UploadButton(label='Загрузить инструментал', file_types=['audio'], variant='primary')
89
  upload_instrumental_audio.upload(process_file_upload, inputs=[upload_instrumental_audio], outputs=[instrumental_audio])
90
  upload_instrumental_audio.upload(update_button_text_inst, outputs=[upload_instrumental_audio])
 
178
  download_btn.click(download_from_url, inputs=[model_zip_link, model_name], outputs=dl_output_message)
179
 
180
  with gr.Tab('Загрузить локально'):
181
+ with gr.Row(equal_height=False):
182
  with gr.Column(variant='panel'):
183
  zip_file = gr.File(label='Zip-файл', file_types=['.zip'], file_count='single')
184
  with gr.Column(variant='panel'):
 
192
  local_upload_output_message = gr.Text(label='Сообщение вывода', interactive=False)
193
  model_upload_button.click(upload_zip_model, inputs=[zip_file, local_model_name], outputs=local_upload_output_message)
194
 
195
+ app.launch(max_threads=512, quiet=True, show_error=True, show_api=False).queue(max_size=1022, default_concurrency_limit=1, api_open=False)