Elfsong commited on
Commit
04484c3
·
1 Parent(s): 56efa3e
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -21,7 +21,8 @@ if "problem" in st.query_params:
21
  else:
22
  df = pd.DataFrame(
23
  {
24
- "problem_id": ["https://huggingface.co/spaces/Elfsong/CodeArena/?problem=" + str(problem['problem_id']) for problem in ds],
 
25
  "dynamic_point": [[random.randint(0, 5000) for _ in range(30)] for problem in ds],
26
  }
27
  )
@@ -32,8 +33,9 @@ else:
32
  st.dataframe(
33
  df,
34
  column_config={
35
- "problem_id": st.column_config.LinkColumn("Problem", display_text=r"https://huggingface\.co/spaces/Elfsong/CodeArena/\?problem=(.*?)"),
36
  "dynamic_point": st.column_config.LineChartColumn("Dynamic Point", y_min=0, y_max=5000),
 
37
  },
38
  hide_index=True,
39
  )
 
21
  else:
22
  df = pd.DataFrame(
23
  {
24
+ "problem_id": [problem['problem_id'] for problem in ds],
25
+ "problem_link": ["https://huggingface.co/spaces/Elfsong/CodeArena/?problem=" + str(problem['problem_id']) for problem in ds],
26
  "dynamic_point": [[random.randint(0, 5000) for _ in range(30)] for problem in ds],
27
  }
28
  )
 
33
  st.dataframe(
34
  df,
35
  column_config={
36
+ "problem_id": st.column_config.TextColumn("Problem ID"),
37
  "dynamic_point": st.column_config.LineChartColumn("Dynamic Point", y_min=0, y_max=5000),
38
+ "problem_link": st.column_config.LinkColumn("Link", display_text="Open"),
39
  },
40
  hide_index=True,
41
  )