mrfakename commited on
Commit
1adab01
1 Parent(s): dfca048

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -72,7 +72,7 @@ def get_leaderboard():
72
  cursor.execute('SELECT name, upvote, downvote FROM model WHERE (upvote + downvote) > 5')
73
  data = cursor.fetchall()
74
  df = pd.DataFrame(data, columns=['name', 'upvote', 'downvote'])
75
- df['license'] = df['name'].replace(model_licenses)
76
  df['name'] = df['name'].replace(model_names)
77
  df['votes'] = df['upvote'] + df['downvote']
78
  # df['score'] = round((df['upvote'] / df['votes']) * 100, 2) # Percentage score
 
72
  cursor.execute('SELECT name, upvote, downvote FROM model WHERE (upvote + downvote) > 5')
73
  data = cursor.fetchall()
74
  df = pd.DataFrame(data, columns=['name', 'upvote', 'downvote'])
75
+ df['license'] = df['name'].map(model_licenses).fillna("Unknown")
76
  df['name'] = df['name'].replace(model_names)
77
  df['votes'] = df['upvote'] + df['downvote']
78
  # df['score'] = round((df['upvote'] / df['votes']) * 100, 2) # Percentage score