Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,8 @@ import json
|
|
| 3 |
import os
|
| 4 |
from datetime import datetime, timezone
|
| 5 |
|
|
|
|
|
|
|
| 6 |
import pandas as pd
|
| 7 |
from huggingface_hub import snapshot_download
|
| 8 |
|
|
@@ -227,7 +229,7 @@ def display(x, y):
|
|
| 227 |
return subset_df
|
| 228 |
|
| 229 |
INTRODUCTION_TEXT = """
|
| 230 |
-
This is a copied space from
|
| 231 |
the results as table this space was modified to simply provides a gradio API interface.
|
| 232 |
Using the following python script below, users can access the full leaderboard data easily.
|
| 233 |
Python on how to access the data:
|
|
@@ -281,4 +283,8 @@ interface = gr.Interface(
|
|
| 281 |
outputs=[hidden_leaderboard_table_for_search]
|
| 282 |
)
|
| 283 |
|
| 284 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
import os
|
| 4 |
from datetime import datetime, timezone
|
| 5 |
|
| 6 |
+
from apscheduler.schedulers.background import BackgroundScheduler
|
| 7 |
+
|
| 8 |
import pandas as pd
|
| 9 |
from huggingface_hub import snapshot_download
|
| 10 |
|
|
|
|
| 229 |
return subset_df
|
| 230 |
|
| 231 |
INTRODUCTION_TEXT = """
|
| 232 |
+
This is a copied space from Open LLM Leaderboard. Instead of displaying
|
| 233 |
the results as table this space was modified to simply provides a gradio API interface.
|
| 234 |
Using the following python script below, users can access the full leaderboard data easily.
|
| 235 |
Python on how to access the data:
|
|
|
|
| 283 |
outputs=[hidden_leaderboard_table_for_search]
|
| 284 |
)
|
| 285 |
|
| 286 |
+
scheduler = BackgroundScheduler()
|
| 287 |
+
scheduler.add_job(restart_space, "interval", seconds=1800)
|
| 288 |
+
scheduler.start()
|
| 289 |
+
|
| 290 |
+
interface.launch()
|