Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -29,10 +29,9 @@ with gr.Blocks(title="RNG Spotify Playlist Shuffler") as demo:
|
|
29 |
gr.Markdown("A clean and simple way to shuffle your Spotify playlists with one click.")
|
30 |
|
31 |
with gr.Column():
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
authorize_button = gr.Button("β
Step 3: Complete Authorization", visible=False)
|
36 |
login_status = gr.Markdown(visible=False)
|
37 |
playlist_dropdown = gr.Dropdown(choices=[], label="Step 4: π§ Select a Playlist", visible=False)
|
38 |
shuffle_button = gr.Button("π Step 5: Shuffle and Play", visible=False)
|
@@ -94,15 +93,6 @@ with gr.Blocks(title="RNG Spotify Playlist Shuffler") as demo:
|
|
94 |
outputs=[result_box]
|
95 |
)
|
96 |
|
97 |
-
def show_authorize_inputs():
|
98 |
-
return gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
99 |
-
|
100 |
-
login_button.click(
|
101 |
-
fn=show_authorize_inputs,
|
102 |
-
outputs=[login_link, code_box, authorize_button],
|
103 |
-
show_progress=False
|
104 |
-
)
|
105 |
-
|
106 |
if __name__ == "__main__":
|
107 |
demo.launch()
|
108 |
|
|
|
29 |
gr.Markdown("A clean and simple way to shuffle your Spotify playlists with one click.")
|
30 |
|
31 |
with gr.Column():
|
32 |
+
login_link = gr.Markdown(f"### π Step 1: [Click here to login to Spotify]({auth_url})")
|
33 |
+
code_box = gr.Textbox(label="Step 2: Paste authorization code", placeholder="...?code=ABC123", visible=True)
|
34 |
+
authorize_button = gr.Button("β
Step 3: Complete Authorization", visible=True)
|
|
|
35 |
login_status = gr.Markdown(visible=False)
|
36 |
playlist_dropdown = gr.Dropdown(choices=[], label="Step 4: π§ Select a Playlist", visible=False)
|
37 |
shuffle_button = gr.Button("π Step 5: Shuffle and Play", visible=False)
|
|
|
93 |
outputs=[result_box]
|
94 |
)
|
95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
if __name__ == "__main__":
|
97 |
demo.launch()
|
98 |
|