|
import streamlit as st |
|
from datasets import load_dataset |
|
|
|
st.title("Code Arena") |
|
|
|
with st.spinner("Loading data...", show_time=True): |
|
ds = load_dataset("Elfsong/leetcode_data", split='train') |
|
|
|
tab_problem, tab_model = st.tabs(["Problems", "Models"]) |
|
|
|
with tab_problem: |
|
for problem in ds: |
|
with st.container(border=True): |
|
id_col, title_col, difficulty_col, dp_col = st.columns([1,5,1,1]) |
|
id_col.write(problem['problem_id']) |
|
title_col.write(problem['title']) |
|
difficulty_col.write(problem['difficulty']) |
|
dp_col.write(0) |
|
|
|
with tab_model: |
|
st.header("Models") |
|
|