lllindsey0615 commited on
Commit
02ae2b7
·
1 Parent(s): 2c23bba

enable oauth with a login botton

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -86,25 +86,25 @@ model_card = ModelCard(
86
 
87
  # Build Gradio interface with dropdowns for model and stem selection
88
  with gr.Blocks() as demo:
89
- components = [
90
- gr.Dropdown(
91
- label="Select Demucs Model",
92
- choices=DEMUX_MODELS,
93
- value="mdx_extra_q"
94
- ),
95
- gr.Dropdown(
96
- label="Select Stem to Separate",
97
- choices=list(STEM_CHOICES.keys()),
98
- value="Vocals"
99
 
100
- )
101
- ]
 
 
 
 
 
 
 
 
102
 
103
  app = build_endpoint(
104
  model_card=model_card,
105
- components=components,
106
  process_fn=process_fn_stem
107
  )
108
 
109
  demo.queue()
110
- demo.launch(share=True, show_error=True)
 
86
 
87
  # Build Gradio interface with dropdowns for model and stem selection
88
  with gr.Blocks() as demo:
89
+ # Add the built-in LoginButton to let users sign in with their HF account.
90
+ gr.LoginButton()
 
 
 
 
 
 
 
 
91
 
92
+ dropdown_model = gr.Dropdown(
93
+ label="Select Demucs Model",
94
+ choices=DEMUX_MODELS,
95
+ value="mdx_extra_q"
96
+ )
97
+ dropdown_stem = gr.Dropdown(
98
+ label="Select Stem to Separate",
99
+ choices=list(STEM_CHOICES.keys()),
100
+ value="Vocals"
101
+ )
102
 
103
  app = build_endpoint(
104
  model_card=model_card,
105
+ components=[dropdown_model, dropdown_stem],
106
  process_fn=process_fn_stem
107
  )
108
 
109
  demo.queue()
110
+ demo.launch(show_error=True)