Spaces:
Running
Running
Commit
·
02ae2b7
1
Parent(s):
2c23bba
enable oauth with a login botton
Browse files
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 |
-
|
| 90 |
-
|
| 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=
|
| 106 |
process_fn=process_fn_stem
|
| 107 |
)
|
| 108 |
|
| 109 |
demo.queue()
|
| 110 |
-
demo.launch(
|
|
|
|
| 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)
|