Spaces:
Runtime error
Runtime error
add dummy table
Browse files- app.py +15 -5
- src/dummy_leaderboard.py +5 -0
app.py
CHANGED
@@ -29,6 +29,7 @@ from src.display.utils import (
|
|
29 |
from src.envs import API, EVAL_REQUESTS_PATH, EVAL_RESULTS_PATH, QUEUE_REPO, REPO_ID, RESULTS_REPO, TOKEN
|
30 |
from src.populate import get_evaluation_queue_df, get_leaderboard_df
|
31 |
from src.submission.submit import add_new_eval
|
|
|
32 |
|
33 |
|
34 |
def restart_space():
|
@@ -208,12 +209,21 @@ with demo:
|
|
208 |
# visible=True,
|
209 |
# )
|
210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
leaderboard_table = gr.components.Dataframe(
|
212 |
-
value=
|
213 |
-
|
214 |
-
|
215 |
-
headers=[c.name for c in fields(AutoEvalColumn) if c.never_hidden],
|
216 |
-
datatype=TYPES,
|
217 |
elem_id="leaderboard-table",
|
218 |
interactive=False,
|
219 |
visible=True,
|
|
|
29 |
from src.envs import API, EVAL_REQUESTS_PATH, EVAL_RESULTS_PATH, QUEUE_REPO, REPO_ID, RESULTS_REPO, TOKEN
|
30 |
from src.populate import get_evaluation_queue_df, get_leaderboard_df
|
31 |
from src.submission.submit import add_new_eval
|
32 |
+
from src import dummy_leaderboard
|
33 |
|
34 |
|
35 |
def restart_space():
|
|
|
209 |
# visible=True,
|
210 |
# )
|
211 |
|
212 |
+
# leaderboard_table = gr.components.Dataframe(
|
213 |
+
# value=leaderboard_df[
|
214 |
+
# [c.name for c in fields(AutoEvalColumn) if c.never_hidden]
|
215 |
+
# ],
|
216 |
+
# headers=[c.name for c in fields(AutoEvalColumn) if c.never_hidden],
|
217 |
+
# datatype=TYPES,
|
218 |
+
# elem_id="leaderboard-table",
|
219 |
+
# interactive=False,
|
220 |
+
# visible=True,
|
221 |
+
# )
|
222 |
+
|
223 |
leaderboard_table = gr.components.Dataframe(
|
224 |
+
value=dummy_leaderboard.DUMMY_LEADERBOARD,
|
225 |
+
headers=dummy_leaderboard.HEADERS,
|
226 |
+
datatype=dummy_leaderboard.TYPES,
|
|
|
|
|
227 |
elem_id="leaderboard-table",
|
228 |
interactive=False,
|
229 |
visible=True,
|
src/dummy_leaderboard.py
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import pandas as pd
|
2 |
+
|
3 |
+
HEADERS = ["score1", "score2", "score3", "score4"]
|
4 |
+
TYPES = ["number", "number", "number", "number"]
|
5 |
+
DUMMY_LEADERBOARD = pd.DataFrame({"GPT-4": [0.4, 0.3, 0.2, 0.1], "GPT-3": [0.1, 0.2, 0.3, 0.4]})
|