lllindsey0615 commited on
Commit
b6d192d
·
1 Parent(s): f7ddc5b

add user login

Browse files
Files changed (3) hide show
  1. README.md +4 -0
  2. app.py +13 -14
  3. requirements.txt +1 -0
README.md CHANGED
@@ -8,6 +8,10 @@ sdk_version: 4.44.0
8
  app_file: app.py
9
  pinned: false
10
  short_description: pyharp-wrapped demucs stem separator model running on GPU
 
 
 
 
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
8
  app_file: app.py
9
  pinned: false
10
  short_description: pyharp-wrapped demucs stem separator model running on GPU
11
+ hf_oauth: true
12
+ hf_oauth_expiration_minutes: 480
13
+ hf_oauth_scopes:
14
+ - inference-api
15
  ---
16
 
17
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py CHANGED
@@ -88,25 +88,24 @@ model_card = ModelCard(
88
 
89
  # Build Gradio interface with dropdowns for model and stem selection
90
  with gr.Blocks() as demo:
91
- components = [
92
- gr.Dropdown(
93
- label="Select Demucs Model",
94
- choices=DEMUX_MODELS,
95
- value="mdx_extra_q"
96
- ),
97
- gr.Dropdown(
98
- label="Select Stem to Separate",
99
- choices=list(STEM_CHOICES.keys()),
100
- value="Vocals"
101
 
102
- )
103
- ]
 
 
 
104
 
105
  app = build_endpoint(
106
  model_card=model_card,
107
- components=components,
108
  process_fn=process_fn_stem
109
  )
110
 
111
  demo.queue()
112
- demo.launch(share=True, show_error=True)
 
88
 
89
  # Build Gradio interface with dropdowns for model and stem selection
90
  with gr.Blocks() as demo:
91
+ gr.LoginButton()
92
+ dropdown_model = gr.Dropdown(
93
+ label="Select Demucs Model",
94
+ choices=DEMUX_MODELS,
95
+ value="mdx_extra_q"
96
+ )
 
 
 
 
97
 
98
+ dropdown_stem = gr.Dropdown(
99
+ label="Select Stem to Separate",
100
+ choices=list(STEM_CHOICES.keys()),
101
+ value="Vocals"
102
+ )
103
 
104
  app = build_endpoint(
105
  model_card=model_card,
106
+ components=[dropdown_model, dropdown_stem],
107
  process_fn=process_fn_stem
108
  )
109
 
110
  demo.queue()
111
+ demo.launch(show_error=True)
requirements.txt CHANGED
@@ -15,3 +15,4 @@ numpy<2
15
  scipy
16
  soundfile
17
  hydra-core>=1.1
 
 
15
  scipy
16
  soundfile
17
  hydra-core>=1.1
18
+ pydantic==2.10.6