Commit
•
3dcfe9e
1
Parent(s):
8f25566
Update app.py
Browse files
app.py
CHANGED
@@ -213,13 +213,6 @@ def update_leaderboard_dataset(rl_env):
|
|
213 |
new_history.to_csv(filename, index=False)
|
214 |
csv_path = os.path.abspath(filename)
|
215 |
|
216 |
-
api.upload_file(
|
217 |
-
path_or_fileobj= csv_path,
|
218 |
-
path_in_repo= filename,
|
219 |
-
repo_id="huggingface-projects/drlc-leaderboard-data",
|
220 |
-
repo_type="dataset",
|
221 |
-
commit_message="Update dataset")
|
222 |
-
|
223 |
return ranked_dataframe
|
224 |
|
225 |
def download_leaderboard_dataset():
|
@@ -262,10 +255,16 @@ def rank_dataframe(dataframe):
|
|
262 |
|
263 |
|
264 |
def run_update_dataset():
|
|
|
265 |
for i in range(0, len(rl_envs)):
|
266 |
rl_env = rl_envs[i]
|
267 |
update_leaderboard_dataset(rl_env["rl_env"])
|
268 |
|
|
|
|
|
|
|
|
|
|
|
269 |
|
270 |
def filter_data(rl_env, path, user_id):
|
271 |
print("RL ENV", rl_env)
|
@@ -318,7 +317,7 @@ with block:
|
|
318 |
|
319 |
""".format(name_leaderboard = rl_env["rl_env_beautiful"], video_link = rl_env["video_link"])
|
320 |
gr.Markdown(markdown)
|
321 |
-
|
322 |
|
323 |
with gr.Row():
|
324 |
gr.Markdown("""
|
|
|
213 |
new_history.to_csv(filename, index=False)
|
214 |
csv_path = os.path.abspath(filename)
|
215 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
return ranked_dataframe
|
217 |
|
218 |
def download_leaderboard_dataset():
|
|
|
255 |
|
256 |
|
257 |
def run_update_dataset():
|
258 |
+
path_ = download_leaderboard_dataset()
|
259 |
for i in range(0, len(rl_envs)):
|
260 |
rl_env = rl_envs[i]
|
261 |
update_leaderboard_dataset(rl_env["rl_env"])
|
262 |
|
263 |
+
api.upload_folder(
|
264 |
+
folder_path=path_,
|
265 |
+
repo_id="huggingface-projects/drlc-leaderboard-data",
|
266 |
+
repo_type="dataset",
|
267 |
+
commit_message="Update dataset")
|
268 |
|
269 |
def filter_data(rl_env, path, user_id):
|
270 |
print("RL ENV", rl_env)
|
|
|
317 |
|
318 |
""".format(name_leaderboard = rl_env["rl_env_beautiful"], video_link = rl_env["video_link"])
|
319 |
gr.Markdown(markdown)
|
320 |
+
|
321 |
|
322 |
with gr.Row():
|
323 |
gr.Markdown("""
|