Spaces:
Running
Running
mrfakename
commited on
Commit
•
0c804b7
1
Parent(s):
b7b58ac
Update app.py
Browse files
app.py
CHANGED
@@ -316,7 +316,7 @@ def model_license(name):
|
|
316 |
return model_licenses[v]
|
317 |
print('---')
|
318 |
return 'Unknown'
|
319 |
-
def get_leaderboard(reveal_prelim
|
320 |
conn = get_db()
|
321 |
cursor = conn.cursor()
|
322 |
sql = 'SELECT name, upvote, downvote FROM model'
|
@@ -460,8 +460,8 @@ with gr.Blocks() as leaderboard:
|
|
460 |
# reveal_prelim = gr.Checkbox(label="Reveal preliminary results", info="Show all models, including models with very few human ratings.", scale=1)
|
461 |
reloadbtn = gr.Button("Refresh", scale=3)
|
462 |
# reveal_prelim.input(get_leaderboard, inputs=[reveal_prelim], outputs=[df])
|
463 |
-
leaderboard.load(get_leaderboard, inputs=[
|
464 |
-
reloadbtn.click(get_leaderboard, inputs=[
|
465 |
# gr.Markdown("DISCLAIMER: The licenses listed may not be accurate or up to date, you are responsible for checking the licenses before using the models. Also note that some models may have additional usage restrictions.")
|
466 |
|
467 |
# with gr.Blocks() as vote:
|
|
|
316 |
return model_licenses[v]
|
317 |
print('---')
|
318 |
return 'Unknown'
|
319 |
+
def get_leaderboard(reveal_prelim = False):
|
320 |
conn = get_db()
|
321 |
cursor = conn.cursor()
|
322 |
sql = 'SELECT name, upvote, downvote FROM model'
|
|
|
460 |
# reveal_prelim = gr.Checkbox(label="Reveal preliminary results", info="Show all models, including models with very few human ratings.", scale=1)
|
461 |
reloadbtn = gr.Button("Refresh", scale=3)
|
462 |
# reveal_prelim.input(get_leaderboard, inputs=[reveal_prelim], outputs=[df])
|
463 |
+
leaderboard.load(get_leaderboard, inputs=[], outputs=[df])
|
464 |
+
reloadbtn.click(get_leaderboard, inputs=[], outputs=[df])
|
465 |
# gr.Markdown("DISCLAIMER: The licenses listed may not be accurate or up to date, you are responsible for checking the licenses before using the models. Also note that some models may have additional usage restrictions.")
|
466 |
|
467 |
# with gr.Blocks() as vote:
|