lllindsey0615 commited on
Commit
95f3812
·
1 Parent(s): fec8182

remove gr.JSON

Browse files
Files changed (1) hide show
  1. app.py +18 -6
app.py CHANGED
@@ -84,24 +84,36 @@ def process_fn_stem(audio_file_path, demucs_model, stem_choice) -> dict:
84
  # Gradio Interface
85
  with gr.Blocks() as demo:
86
  gr.Markdown("# 🎧 Demucs Stem Separator")
87
- gr.Markdown("Log in with your Hugging Face account to separate stems from audio files.")
88
 
89
  gr.LoginButton()
90
 
91
- model_dropdown = gr.Dropdown(label="Select Demucs Model", choices=DEMUX_MODELS, value="mdx_extra_q")
92
- stem_dropdown = gr.Dropdown(label="Select Stem", choices=list(STEM_CHOICES.keys()), value="Vocals")
 
 
 
 
 
 
 
 
 
 
93
  audio_input = gr.Audio(label="Upload Audio", type="filepath")
94
- output_file = gr.File(label="Separated Stem File (.wav)")
95
- output_json = gr.JSON(label="Metadata")
 
96
 
97
  run_button = gr.Button("Run Separation")
98
 
99
  run_button.click(
100
  fn=process_fn_stem,
101
  inputs=[audio_input, model_dropdown, stem_dropdown],
102
- outputs=[output_file, output_json]
103
  )
104
 
105
  demo.queue()
106
 
 
107
  demo.launch(show_error=True)
 
84
  # Gradio Interface
85
  with gr.Blocks() as demo:
86
  gr.Markdown("# 🎧 Demucs Stem Separator")
87
+ gr.Markdown("Log in with your Hugging Face account to separate music into stems.")
88
 
89
  gr.LoginButton()
90
 
91
+ with gr.Row():
92
+ model_dropdown = gr.Dropdown(
93
+ label="Select Demucs Model",
94
+ choices=DEMUX_MODELS,
95
+ value="mdx_extra_q"
96
+ )
97
+ stem_dropdown = gr.Dropdown(
98
+ label="Select Stem to Separate",
99
+ choices=list(STEM_CHOICES.keys()),
100
+ value="Vocals"
101
+ )
102
+
103
  audio_input = gr.Audio(label="Upload Audio", type="filepath")
104
+
105
+ output_file = gr.File(label="Separated Stem (.wav)")
106
+ output_text = gr.Textbox(label="Metadata (Debug-safe JSON)", lines=6, max_lines=10)
107
 
108
  run_button = gr.Button("Run Separation")
109
 
110
  run_button.click(
111
  fn=process_fn_stem,
112
  inputs=[audio_input, model_dropdown, stem_dropdown],
113
+ outputs=[output_file, output_text]
114
  )
115
 
116
  demo.queue()
117
 
118
+
119
  demo.launch(show_error=True)