TheXeos commited on
Commit
9a866e7
โ€ข
1 Parent(s): 485e890

Maybe a refresh button will help

Browse files
Files changed (1) hide show
  1. app.py +19 -17
app.py CHANGED
@@ -18,7 +18,6 @@ repo = Repository(
18
  local_dir="soccer_elo", clone_from=DATASET_REPO_URL, use_auth_token=HF_TOKEN
19
  )
20
 
21
- block = gr.Blocks()
22
  matchmaking = Matchmaking()
23
  api = HfApi()
24
 
@@ -39,28 +38,31 @@ def get_elo_data() -> pd.DataFrame:
39
  return data
40
 
41
 
42
- with block:
43
  gr.Markdown(f"""
44
- # ๐Ÿ† The Deep Reinforcement Learning Course Leaderboard ๐Ÿ†
45
 
46
- This is the leaderboard of trained agents during the Deep Reinforcement Learning Course. A free course from beginner to expert.
47
 
48
- This is the Soccer environment leaderboard, use Ctrl+F to find your rank ๐Ÿ†
49
 
50
- We use an ELO rating to sort the models.
51
- You **can click on the model's name** to be redirected to its model card which includes documentation.
52
 
53
- ๐Ÿค– You want to try to train your agents? <a href="http://eepurl.com/ic5ZUD" target="_blank">Sign up to the Hugging Face free Deep Reinforcement Learning Course ๐Ÿค— </a>.
54
 
55
- You want to compare two agents? <a href="https://huggingface.co/spaces/ThomasSimonini/Compare-Reinforcement-Learning-Agents" target="_blank">It's possible using this Spaces demo ๐Ÿ‘€ </a>.
56
 
57
- ๐Ÿ”ง There is an **environment missing?** Please open an issue.
58
- """)
59
- with gr.Blocks() as block:
60
- gr.components.Dataframe(
61
- value=get_elo_data(),
62
- headers=["Ranking ๐Ÿ†", "User ๐Ÿค—", "Model id ๐Ÿค–", "ELO ๐Ÿš€", "Games played ๐ŸŽฎ"],
63
- datatype=["number", "markdown", "markdown", "number", "number"]
64
- )
 
 
 
65
 
66
  block.launch()
 
18
  local_dir="soccer_elo", clone_from=DATASET_REPO_URL, use_auth_token=HF_TOKEN
19
  )
20
 
 
21
  matchmaking = Matchmaking()
22
  api = HfApi()
23
 
 
38
  return data
39
 
40
 
41
+ with gr.Blocks() as block:
42
  gr.Markdown(f"""
43
+ # ๐Ÿ† The Deep Reinforcement Learning Course Leaderboard ๐Ÿ†
44
 
45
+ This is the leaderboard of trained agents during the Deep Reinforcement Learning Course. A free course from beginner to expert.
46
 
47
+ This is the Soccer environment leaderboard, use Ctrl+F to find your rank ๐Ÿ†
48
 
49
+ We use an ELO rating to sort the models.
50
+ You **can click on the model's name** to be redirected to its model card which includes documentation.
51
 
52
+ ๐Ÿค– You want to try to train your agents? <a href="http://eepurl.com/ic5ZUD" target="_blank">Sign up to the Hugging Face free Deep Reinforcement Learning Course ๐Ÿค— </a>.
53
 
54
+ You want to compare two agents? <a href="https://huggingface.co/spaces/ThomasSimonini/Compare-Reinforcement-Learning-Agents" target="_blank">It's possible using this Spaces demo ๐Ÿ‘€ </a>.
55
 
56
+ ๐Ÿ”ง There is an **environment missing?** Please open an issue.
57
+ """)
58
+ with gr.Row():
59
+ output = gr.components.Dataframe(
60
+ value=get_elo_data(),
61
+ headers=["Ranking ๐Ÿ†", "User ๐Ÿค—", "Model id ๐Ÿค–", "ELO ๐Ÿš€", "Games played ๐ŸŽฎ"],
62
+ datatype=["number", "markdown", "markdown", "number", "number"]
63
+ )
64
+ with gr.Row():
65
+ refresh = gr.Button("Refresh")
66
+ refresh.click(get_elo_data, inputs=[], outputs=output)
67
 
68
  block.launch()