mrfakename commited on
Commit
0053ffc
1 Parent(s): b80eb61

Fix bad SQL

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -92,7 +92,7 @@ def create_db():
92
  def get_data():
93
  conn = get_db()
94
  cursor = conn.cursor()
95
- cursor.execute('SELECT name, upvote, downvote FROM model WHERE SUM(upvote, downvote) > 5')
96
  data = cursor.fetchall()
97
  df = pd.DataFrame(data, columns=['name', 'upvote', 'downvote'])
98
  df['name'] = df['name'].replace(model_names)
 
92
  def get_data():
93
  conn = get_db()
94
  cursor = conn.cursor()
95
+ cursor.execute('SELECT name, upvote, downvote FROM model WHERE (upvote + downvote) > 5')
96
  data = cursor.fetchall()
97
  df = pd.DataFrame(data, columns=['name', 'upvote', 'downvote'])
98
  df['name'] = df['name'].replace(model_names)