Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
mrfakename
commited on
Commit
•
b92968c
1
Parent(s):
ba94738
Update app.py
Browse files
app.py
CHANGED
@@ -352,7 +352,7 @@ def upvote_model(model, uname):
|
|
352 |
cursor.execute('UPDATE model SET upvote = upvote + 1 WHERE name = ?', (model,))
|
353 |
if cursor.rowcount == 0:
|
354 |
cursor.execute('INSERT OR REPLACE INTO model (name, upvote, downvote) VALUES (?, 1, 0)', (model,))
|
355 |
-
cursor.execute('INSERT INTO vote (username, model, vote) VALUES (?, ?, ?)', (uname, model, 1,))
|
356 |
with scheduler.lock:
|
357 |
conn.commit()
|
358 |
cursor.close()
|
@@ -369,7 +369,7 @@ def downvote_model(model, uname):
|
|
369 |
cursor.execute('UPDATE model SET downvote = downvote + 1 WHERE name = ?', (model,))
|
370 |
if cursor.rowcount == 0:
|
371 |
cursor.execute('INSERT OR REPLACE INTO model (name, upvote, downvote) VALUES (?, 0, 1)', (model,))
|
372 |
-
cursor.execute('INSERT INTO vote (username, model, vote) VALUES (?, ?, ?)', (uname, model, -1,))
|
373 |
with scheduler.lock:
|
374 |
conn.commit()
|
375 |
cursor.close()
|
|
|
352 |
cursor.execute('UPDATE model SET upvote = upvote + 1 WHERE name = ?', (model,))
|
353 |
if cursor.rowcount == 0:
|
354 |
cursor.execute('INSERT OR REPLACE INTO model (name, upvote, downvote) VALUES (?, 1, 0)', (model,))
|
355 |
+
#cursor.execute('INSERT INTO vote (username, model, vote) VALUES (?, ?, ?)', (uname, model, 1,))
|
356 |
with scheduler.lock:
|
357 |
conn.commit()
|
358 |
cursor.close()
|
|
|
369 |
cursor.execute('UPDATE model SET downvote = downvote + 1 WHERE name = ?', (model,))
|
370 |
if cursor.rowcount == 0:
|
371 |
cursor.execute('INSERT OR REPLACE INTO model (name, upvote, downvote) VALUES (?, 0, 1)', (model,))
|
372 |
+
#cursor.execute('INSERT INTO vote (username, model, vote) VALUES (?, ?, ?)', (uname, model, -1,))
|
373 |
with scheduler.lock:
|
374 |
conn.commit()
|
375 |
cursor.close()
|