Update
Browse files
app.py
CHANGED
@@ -15,30 +15,18 @@ else:
|
|
15 |
|
16 |
tab_problem, tab_submission, tab_model = st.tabs(["Problems", "Submissions", "Models"])
|
17 |
|
18 |
-
|
19 |
-
|
20 |
with tab_problem:
|
21 |
df = pd.DataFrame(
|
22 |
{
|
23 |
-
"
|
24 |
-
"
|
25 |
-
"stars": [random.randint(0, 1000) for _ in range(3)],
|
26 |
-
"views_history": [[random.randint(0, 5000) for _ in range(30)] for _ in range(3)],
|
27 |
}
|
28 |
)
|
29 |
st.dataframe(
|
30 |
df,
|
31 |
column_config={
|
32 |
-
"
|
33 |
-
"
|
34 |
-
"Github Stars",
|
35 |
-
help="Number of stars on GitHub",
|
36 |
-
format="%d ⭐",
|
37 |
-
),
|
38 |
-
"url": st.column_config.LinkColumn("App URL"),
|
39 |
-
"views_history": st.column_config.LineChartColumn(
|
40 |
-
"Views (past 30 days)", y_min=0, y_max=5000
|
41 |
-
),
|
42 |
},
|
43 |
hide_index=True,
|
44 |
)
|
|
|
15 |
|
16 |
tab_problem, tab_submission, tab_model = st.tabs(["Problems", "Submissions", "Models"])
|
17 |
|
|
|
|
|
18 |
with tab_problem:
|
19 |
df = pd.DataFrame(
|
20 |
{
|
21 |
+
"problem_id": [f"/?problem={problem['problem_id']}" for problem in ds],
|
22 |
+
"dynamic_point": [[random.randint(0, 5000) for _ in range(30)] for problem in ds],
|
|
|
|
|
23 |
}
|
24 |
)
|
25 |
st.dataframe(
|
26 |
df,
|
27 |
column_config={
|
28 |
+
"url": st.column_config.LinkColumn("Problem", display_text=r"\/\?problem=(.*?)"),
|
29 |
+
"dynamic_point": st.column_config.LineChartColumn("Dynamic Point", y_min=0, y_max=5000),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
},
|
31 |
hide_index=True,
|
32 |
)
|