LosCaquitos commited on
Commit
9a450b8
·
verified ·
1 Parent(s): 2113afc

Update lib/ui.py

Browse files
Files changed (1) hide show
  1. lib/ui.py +3 -14
lib/ui.py CHANGED
@@ -7,27 +7,20 @@ import gradio as gr
7
  from .config import OUTPUT_FORMATS, DEFAULT_OUTPUT_FORMAT
8
  from .models import list_models
9
 
10
- # Original functions (keep as they are)
11
  def refresh_models():
12
- """Refresh the model dropdown and table."""
13
  models = list_models()
14
  return gr.update(value=models, choices=models), models
15
 
16
  def toggle_autotune(enable):
17
- """Show/hide autotune strength slider."""
18
  return gr.update(visible=enable)
19
 
20
  def upload_model(zip_file, model_name):
21
- """Extract and load a model from a ZIP file."""
22
- # Original implementation
23
  return "Model uploaded", list_models(), list_models()
24
 
25
- # New UI helpers for the full pipeline
26
-
27
  def create_video_section():
28
- """
29
- Returns a Gradio Video component for uploading video files.
30
- """
31
  return gr.Video(
32
  label="Upload Video (MP4, WebM, etc.)",
33
  sources=["upload"],
@@ -36,10 +29,6 @@ def create_video_section():
36
  )
37
 
38
  def create_five_outputs():
39
- """
40
- Creates the 5 output audio components and returns them as a tuple.
41
- Use this in your app.py to display the results.
42
- """
43
  with gr.Row():
44
  with gr.Column():
45
  gr.Markdown("#### 🎤 Input Files (no RVC)")
 
7
  from .config import OUTPUT_FORMATS, DEFAULT_OUTPUT_FORMAT
8
  from .models import list_models
9
 
10
+ # Funções originais (mantidas)
11
  def refresh_models():
 
12
  models = list_models()
13
  return gr.update(value=models, choices=models), models
14
 
15
  def toggle_autotune(enable):
 
16
  return gr.update(visible=enable)
17
 
18
  def upload_model(zip_file, model_name):
19
+ # Implementação original
 
20
  return "Model uploaded", list_models(), list_models()
21
 
22
+ # Novas funções para UI
 
23
  def create_video_section():
 
 
 
24
  return gr.Video(
25
  label="Upload Video (MP4, WebM, etc.)",
26
  sources=["upload"],
 
29
  )
30
 
31
  def create_five_outputs():
 
 
 
 
32
  with gr.Row():
33
  with gr.Column():
34
  gr.Markdown("#### 🎤 Input Files (no RVC)")