Update
Browse files
app.py
CHANGED
@@ -6,16 +6,40 @@ st.title("Code Arena")
|
|
6 |
with st.spinner("Loading data...", show_time=True):
|
7 |
ds = load_dataset("Elfsong/leetcode_data", split='train')
|
8 |
|
9 |
-
tab_problem, tab_model = st.tabs(["Problems", "Models"])
|
|
|
|
|
|
|
|
|
10 |
|
11 |
with tab_problem:
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
with tab_model:
|
21 |
st.header("Models")
|
|
|
6 |
with st.spinner("Loading data...", show_time=True):
|
7 |
ds = load_dataset("Elfsong/leetcode_data", split='train')
|
8 |
|
9 |
+
tab_problem, tab_submission, tab_model = st.tabs(["Problems", "Submissions", "Models"])
|
10 |
+
|
11 |
+
@st.dialog("Problem Submission")
|
12 |
+
def problem_submission(item):
|
13 |
+
st.write(f"Why is {item['problem_id']} your favorite?")
|
14 |
|
15 |
with tab_problem:
|
16 |
+
df = pd.DataFrame(
|
17 |
+
{
|
18 |
+
"name": ["Roadmap", "Extras", "Issues"],
|
19 |
+
"url": ["https://roadmap.streamlit.app", "https://extras.streamlit.app", "https://issues.streamlit.app"],
|
20 |
+
"stars": [random.randint(0, 1000) for _ in range(3)],
|
21 |
+
"views_history": [[random.randint(0, 5000) for _ in range(30)] for _ in range(3)],
|
22 |
+
}
|
23 |
+
)
|
24 |
+
st.dataframe(
|
25 |
+
df,
|
26 |
+
column_config={
|
27 |
+
"name": "App name",
|
28 |
+
"stars": st.column_config.NumberColumn(
|
29 |
+
"Github Stars",
|
30 |
+
help="Number of stars on GitHub",
|
31 |
+
format="%d ⭐",
|
32 |
+
),
|
33 |
+
"url": st.column_config.LinkColumn("App URL"),
|
34 |
+
"views_history": st.column_config.LineChartColumn(
|
35 |
+
"Views (past 30 days)", y_min=0, y_max=5000
|
36 |
+
),
|
37 |
+
},
|
38 |
+
hide_index=True,
|
39 |
+
)
|
40 |
+
|
41 |
+
with tab_submission:
|
42 |
+
st.header("Submissions")
|
43 |
|
44 |
with tab_model:
|
45 |
st.header("Models")
|