helliun commited on
Commit
adb850a
·
verified ·
1 Parent(s): bed3338

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -183,11 +183,10 @@ theme = gr.themes.Soft(primary_hue="red", secondary_hue="blue")
183
  with gr.Blocks(theme=theme) as app:
184
 
185
  gr.Markdown(
186
- """## Song Ranker for Spotify
187
- This tool helps you create **accurate rankings** of songs based on your personal preferences.
188
- It does this by asking you questions comparing a random pair of songs, and then using your
189
- answers to calculate Elo scores for ranking. Import songs by pasting a **song, playlist, or album**
190
- link below and clicking "Add".
191
  """
192
  )
193
 
@@ -225,7 +224,7 @@ with gr.Blocks(theme=theme) as app:
225
  artist_input = gr.Textbox(label="Artist")
226
  song_title_input = gr.Textbox(label="Song Title")
227
  add_button = gr.Button("Add Song")
228
-
229
  gr.Markdown(
230
  """### Remove Songs
231
  """
 
183
  with gr.Blocks(theme=theme) as app:
184
 
185
  gr.Markdown(
186
+ """## Preference-based Elo Ranker
187
+ This tool helps you create **accurate rankings** of things based on your personal preferences.
188
+ It does this by asking you questions comparing a random pair of your inpys, and then using your
189
+ answers to calculate Elo scores for ranking.
 
190
  """
191
  )
192
 
 
224
  artist_input = gr.Textbox(label="Artist")
225
  song_title_input = gr.Textbox(label="Song Title")
226
  add_button = gr.Button("Add Song")
227
+ add_button.click(add_and_compare, inputs=[artist_input, song_title_input, rankings], outputs=[compare_index_1, compare_index_2, rankings])
228
  gr.Markdown(
229
  """### Remove Songs
230
  """