Update
Browse files
app.py
CHANGED
|
@@ -11,24 +11,25 @@ from datasets import load_dataset
|
|
| 11 |
|
| 12 |
st.title("Code:blue[Arena]")
|
| 13 |
|
| 14 |
-
|
| 15 |
-
problem_dict = dict()
|
| 16 |
|
| 17 |
-
|
|
|
|
| 18 |
venus_ds = load_dataset("Elfsong/leetcode_data", split='train')
|
| 19 |
for problem in venus_ds:
|
| 20 |
problem_id = problem["title"]
|
| 21 |
problem['type'] = "leetcode"
|
| 22 |
problem_dict[problem_id] = problem
|
| 23 |
|
| 24 |
-
|
|
|
|
| 25 |
apps_ds = load_dataset("Elfsong/APPS_Python", split='test')
|
| 26 |
for problem in apps_ds:
|
| 27 |
problem_id = f'apps_{problem["problem_id"]}'
|
| 28 |
problem['type'] = "apps"
|
| 29 |
problem_dict[problem_id] = problem
|
| 30 |
|
| 31 |
-
|
| 32 |
|
| 33 |
|
| 34 |
if "problem" in st.query_params:
|
|
|
|
| 11 |
|
| 12 |
st.title("Code:blue[Arena]")
|
| 13 |
|
| 14 |
+
problem_dict = dict()
|
|
|
|
| 15 |
|
| 16 |
+
# Venus Data
|
| 17 |
+
with st.spinner("Loading Venus data...", show_time=True):
|
| 18 |
venus_ds = load_dataset("Elfsong/leetcode_data", split='train')
|
| 19 |
for problem in venus_ds:
|
| 20 |
problem_id = problem["title"]
|
| 21 |
problem['type'] = "leetcode"
|
| 22 |
problem_dict[problem_id] = problem
|
| 23 |
|
| 24 |
+
# APPS Data
|
| 25 |
+
with st.spinner("Loading APPS data...", show_time=True):
|
| 26 |
apps_ds = load_dataset("Elfsong/APPS_Python", split='test')
|
| 27 |
for problem in apps_ds:
|
| 28 |
problem_id = f'apps_{problem["problem_id"]}'
|
| 29 |
problem['type'] = "apps"
|
| 30 |
problem_dict[problem_id] = problem
|
| 31 |
|
| 32 |
+
problem_count = len(problem_dict)
|
| 33 |
|
| 34 |
|
| 35 |
if "problem" in st.query_params:
|