xieli commited on
Commit
13aed20
Β·
1 Parent(s): 17ea1d8

feat: optimize ui

Browse files
Files changed (1) hide show
  1. app.py +16 -6
app.py CHANGED
@@ -359,16 +359,18 @@ class EditxTab:
359
  label="Input Audio",
360
  )
361
  self.generated_text = gr.Textbox(label="Target Text", lines=1, max_lines=200, max_length=100)
362
- with gr.Row():
363
- self.button_tts = gr.Button("CLONE")
364
- self.button_edit = gr.Button("EDIT")
365
-
366
  with gr.Column():
367
  with gr.Row():
368
  self.edit_type = gr.Dropdown(label="Task", choices=self.edit_type_list, value="clone")
369
  self.edit_info = gr.Dropdown(label="Sub-task", choices=[], value=None)
370
  self.chat_box = gr.Chatbot(label="History", type="messages", height=480*1)
371
- self.clean_history_submit = gr.Button("Clear History")
 
 
 
 
 
 
372
 
373
  gr.Markdown("---")
374
  gr.Markdown("""
@@ -420,7 +422,15 @@ class EditxTab:
420
 
421
  def launch_demo(args, editx_tab):
422
  """Launch the gradio demo"""
423
- with gr.Blocks(theme=gr.themes.Soft(), title="πŸŽ™οΈ Step-Audio-EditX") as demo:
 
 
 
 
 
 
 
 
424
  gr.Markdown("## πŸŽ™οΈ Step-Audio-EditX")
425
  gr.Markdown("Audio Editing and Zero-Shot Cloning using Step-Audio-EditX")
426
 
 
359
  label="Input Audio",
360
  )
361
  self.generated_text = gr.Textbox(label="Target Text", lines=1, max_lines=200, max_length=100)
 
 
 
 
362
  with gr.Column():
363
  with gr.Row():
364
  self.edit_type = gr.Dropdown(label="Task", choices=self.edit_type_list, value="clone")
365
  self.edit_info = gr.Dropdown(label="Sub-task", choices=[], value=None)
366
  self.chat_box = gr.Chatbot(label="History", type="messages", height=480*1)
367
+ with gr.Row():
368
+ with gr.Column():
369
+ with gr.Row():
370
+ self.button_tts = gr.Button("CLONE", variant="primary")
371
+ self.button_edit = gr.Button("EDIT", variant="primary")
372
+ with gr.Column():
373
+ self.clean_history_submit = gr.Button("Clear History", variant="primary")
374
 
375
  gr.Markdown("---")
376
  gr.Markdown("""
 
422
 
423
  def launch_demo(args, editx_tab):
424
  """Launch the gradio demo"""
425
+ with gr.Blocks(
426
+ theme=gr.themes.Soft(),
427
+ title="πŸŽ™οΈ Step-Audio-EditX",
428
+ css="""
429
+ :root {
430
+ --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
431
+ --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
432
+ }
433
+ """) as demo:
434
  gr.Markdown("## πŸŽ™οΈ Step-Audio-EditX")
435
  gr.Markdown("Audio Editing and Zero-Shot Cloning using Step-Audio-EditX")
436