Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -181,7 +181,11 @@ def generate_leaderboard(collection):
|
|
181 |
return leaderboard_data
|
182 |
|
183 |
def refresh_leaderboard():
|
184 |
-
|
|
|
|
|
|
|
|
|
185 |
# Gradio interface setup
|
186 |
# Gradio interface setup
|
187 |
with gr.Blocks() as demo:
|
@@ -213,7 +217,7 @@ with gr.Blocks() as demo:
|
|
213 |
except:
|
214 |
leaderboard = gr.Dataframe()
|
215 |
refresh_btn = gr.Button("Refresh Leaderboard")
|
216 |
-
refresh_btn.click(refresh_leaderboard,
|
217 |
|
218 |
# Launch the Gradio interface
|
219 |
if __name__ == "__main__":
|
|
|
181 |
return leaderboard_data
|
182 |
|
183 |
def refresh_leaderboard():
|
184 |
+
collection = init_database()
|
185 |
+
return generate_leaderboard(collection)
|
186 |
+
|
187 |
+
# ...
|
188 |
+
|
189 |
# Gradio interface setup
|
190 |
# Gradio interface setup
|
191 |
with gr.Blocks() as demo:
|
|
|
217 |
except:
|
218 |
leaderboard = gr.Dataframe()
|
219 |
refresh_btn = gr.Button("Refresh Leaderboard")
|
220 |
+
refresh_btn.click(refresh_leaderboard, outputs=[leaderboard])
|
221 |
|
222 |
# Launch the Gradio interface
|
223 |
if __name__ == "__main__":
|