Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -196,7 +196,10 @@ with gr.Blocks() as demo:
|
|
196 |
upvote_btn_a.click(vote_up_model, inputs=[state, chatbot1,chatbot2], outputs=[chatbot1,chatbot2,upvote_btn_a,upvote_btn_b,textbox,submit_btn])
|
197 |
upvote_btn_b.click(vote_down_model, inputs=[state, chatbot1,chatbot2], outputs=[chatbot1,chatbot2,upvote_btn_a,upvote_btn_b,textbox,submit_btn])
|
198 |
with gr.Tab("Leaderboard"):
|
199 |
-
|
|
|
|
|
|
|
200 |
refresh_btn = gr.Button("Refresh Leaderboard")
|
201 |
|
202 |
# Function to refresh leaderboard
|
|
|
196 |
upvote_btn_a.click(vote_up_model, inputs=[state, chatbot1,chatbot2], outputs=[chatbot1,chatbot2,upvote_btn_a,upvote_btn_b,textbox,submit_btn])
|
197 |
upvote_btn_b.click(vote_down_model, inputs=[state, chatbot1,chatbot2], outputs=[chatbot1,chatbot2,upvote_btn_a,upvote_btn_b,textbox,submit_btn])
|
198 |
with gr.Tab("Leaderboard"):
|
199 |
+
try:
|
200 |
+
leaderboard = gr.Dataframe(refresh_leaderboard())
|
201 |
+
except:
|
202 |
+
leaderboard=gr.Dataframe()
|
203 |
refresh_btn = gr.Button("Refresh Leaderboard")
|
204 |
|
205 |
# Function to refresh leaderboard
|