Spaces:
Runtime error
Runtime error
Commit
β’
3ed1bd5
1
Parent(s):
bd8d2fb
Update app.py
Browse files
app.py
CHANGED
@@ -136,6 +136,7 @@ rl_envs = [
|
|
136 |
]
|
137 |
|
138 |
def restart():
|
|
|
139 |
api.restart_space(repo_id="huggingface-projects/Deep-Reinforcement-Learning-Leaderboard")
|
140 |
|
141 |
def get_metadata(model_id):
|
@@ -219,7 +220,6 @@ def update_leaderboard_dataset(rl_env, path):
|
|
219 |
|
220 |
def download_leaderboard_dataset():
|
221 |
path = snapshot_download(repo_id=DATASET_REPO_ID, repo_type="dataset")
|
222 |
-
print("PATH DOWNLOAD", path)
|
223 |
return path
|
224 |
|
225 |
def get_data(rl_env, path) -> pd.DataFrame:
|
@@ -270,11 +270,7 @@ def run_update_dataset():
|
|
270 |
commit_message="Update dataset")
|
271 |
|
272 |
def filter_data(rl_env, path, user_id):
|
273 |
-
print("RL ENV", rl_env)
|
274 |
-
print("PATH", path)
|
275 |
-
print("USER ID", user_id)
|
276 |
data_df = get_data_no_html(rl_env, path)
|
277 |
-
print(data_df)
|
278 |
models = []
|
279 |
models = data_df[data_df["User"] == user_id]
|
280 |
|
@@ -285,7 +281,6 @@ def filter_data(rl_env, path, user_id):
|
|
285 |
models.loc[index, "Model"] = make_clickable_model(model_id)
|
286 |
|
287 |
|
288 |
-
print(models)
|
289 |
return models
|
290 |
|
291 |
run_update_dataset()
|
@@ -337,7 +332,6 @@ with block:
|
|
337 |
env = gr.Variable(rl_env["rl_env"])
|
338 |
grpath = gr.Variable(path_)
|
339 |
with gr.Row():
|
340 |
-
print("PATH USED", path_)
|
341 |
gr_dataframe = gr.components.Dataframe(value=get_data(rl_env["rl_env"], path_), headers=["Ranking π", "User π€", "Model id π€", "Results", "Mean Reward", "Std Reward"], datatype=["number", "markdown", "markdown", "number", "number", "number"], row_count=(100, 'fixed'))
|
342 |
|
343 |
with gr.Row():
|
|
|
136 |
]
|
137 |
|
138 |
def restart():
|
139 |
+
print("RESTART")
|
140 |
api.restart_space(repo_id="huggingface-projects/Deep-Reinforcement-Learning-Leaderboard")
|
141 |
|
142 |
def get_metadata(model_id):
|
|
|
220 |
|
221 |
def download_leaderboard_dataset():
|
222 |
path = snapshot_download(repo_id=DATASET_REPO_ID, repo_type="dataset")
|
|
|
223 |
return path
|
224 |
|
225 |
def get_data(rl_env, path) -> pd.DataFrame:
|
|
|
270 |
commit_message="Update dataset")
|
271 |
|
272 |
def filter_data(rl_env, path, user_id):
|
|
|
|
|
|
|
273 |
data_df = get_data_no_html(rl_env, path)
|
|
|
274 |
models = []
|
275 |
models = data_df[data_df["User"] == user_id]
|
276 |
|
|
|
281 |
models.loc[index, "Model"] = make_clickable_model(model_id)
|
282 |
|
283 |
|
|
|
284 |
return models
|
285 |
|
286 |
run_update_dataset()
|
|
|
332 |
env = gr.Variable(rl_env["rl_env"])
|
333 |
grpath = gr.Variable(path_)
|
334 |
with gr.Row():
|
|
|
335 |
gr_dataframe = gr.components.Dataframe(value=get_data(rl_env["rl_env"], path_), headers=["Ranking π", "User π€", "Model id π€", "Results", "Mean Reward", "Std Reward"], datatype=["number", "markdown", "markdown", "number", "number", "number"], row_count=(100, 'fixed'))
|
336 |
|
337 |
with gr.Row():
|