jisaacso219 commited on
Commit
83a3f7a
Β·
verified Β·
1 Parent(s): 59a85c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -13
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
- login_button = gr.Button("πŸ” Step 1: Login to Spotify")
33
- login_link = gr.Markdown(f"[Click here to login to Spotify]({auth_url})", visible=False)
34
- code_box = gr.Textbox(label="Step 2: Paste authorization code", placeholder="...?code=ABC123", visible=False)
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