helliun commited on
Commit
3271662
1 Parent(s): bf05ba0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -8,10 +8,10 @@ def update_scores(winner, loser, k_factor=100):
8
  return winner, loser
9
 
10
  def vote_startup(songs_df):
11
- try:
12
- songs_df = songs_df[["elo_score", "artist", "song_title"]]
13
- except:
14
- songs_df = pd.DataFrame(columns=['elo_score', 'artist', 'song_title'])
15
  if len(songs_df)>0:
16
  sample = songs_df.sample(frac=1).iloc[0]
17
  song_title, artist = sample["song_title"], sample["artist"]
 
8
  return winner, loser
9
 
10
  def vote_startup(songs_df):
11
+ try:
12
+ songs_df = songs_df[["elo_score", "artist", "song_title"]]
13
+ except:
14
+ songs_df = pd.DataFrame(columns=['elo_score', 'artist', 'song_title'])
15
  if len(songs_df)>0:
16
  sample = songs_df.sample(frac=1).iloc[0]
17
  song_title, artist = sample["song_title"], sample["artist"]