Spaces:
Running
Running
mrfakename
commited on
Commit
•
21f92d9
1
Parent(s):
1f4eba7
Update app.py
Browse files
app.py
CHANGED
@@ -69,7 +69,7 @@ def get_db():
|
|
69 |
def get_leaderboard():
|
70 |
conn = get_db()
|
71 |
cursor = conn.cursor()
|
72 |
-
cursor.execute('SELECT name, upvote, downvote FROM model WHERE (upvote + downvote) >
|
73 |
data = cursor.fetchall()
|
74 |
df = pd.DataFrame(data, columns=['name', 'upvote', 'downvote'])
|
75 |
df['license'] = df['name'].map(model_licenses).fillna("Unknown")
|
@@ -455,17 +455,17 @@ def synthandreturn(text):
|
|
455 |
mdl1, # model1
|
456 |
mdl2, # model2
|
457 |
# 'Vote to reveal model A', # prevmodel1
|
458 |
-
router.predict(
|
459 |
text,
|
460 |
AVAILABLE_MODELS[mdl1],
|
461 |
api_name="/synthesize"
|
462 |
-
), # aud1
|
463 |
# 'Vote to reveal model B', # prevmodel2
|
464 |
-
router.predict(
|
465 |
text,
|
466 |
AVAILABLE_MODELS[mdl2],
|
467 |
api_name="/synthesize"
|
468 |
-
), # aud2
|
469 |
gr.update(visible=True, interactive=True),
|
470 |
gr.update(visible=True, interactive=True),
|
471 |
gr.update(visible=False),
|
|
|
69 |
def get_leaderboard():
|
70 |
conn = get_db()
|
71 |
cursor = conn.cursor()
|
72 |
+
cursor.execute('SELECT name, upvote, downvote FROM model WHERE (upvote + downvote) > 750')
|
73 |
data = cursor.fetchall()
|
74 |
df = pd.DataFrame(data, columns=['name', 'upvote', 'downvote'])
|
75 |
df['license'] = df['name'].map(model_licenses).fillna("Unknown")
|
|
|
455 |
mdl1, # model1
|
456 |
mdl2, # model2
|
457 |
# 'Vote to reveal model A', # prevmodel1
|
458 |
+
gr.update(visible=True, value=router.predict(
|
459 |
text,
|
460 |
AVAILABLE_MODELS[mdl1],
|
461 |
api_name="/synthesize"
|
462 |
+
)), # aud1
|
463 |
# 'Vote to reveal model B', # prevmodel2
|
464 |
+
gr.update(visible=True, value=router.predict(
|
465 |
text,
|
466 |
AVAILABLE_MODELS[mdl2],
|
467 |
api_name="/synthesize"
|
468 |
+
)), # aud2
|
469 |
gr.update(visible=True, interactive=True),
|
470 |
gr.update(visible=True, interactive=True),
|
471 |
gr.update(visible=False),
|