Update
Browse files
app.py
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import random
|
| 2 |
import pandas as pd
|
| 3 |
import streamlit as st
|
|
@@ -22,10 +28,11 @@ if "problem" in st.query_params:
|
|
| 22 |
st.markdown(problem_instance["question_content"])
|
| 23 |
|
| 24 |
with st.expander("Test Cases"):
|
|
|
|
| 25 |
df = pd.DataFrame(
|
| 26 |
{
|
| 27 |
-
"input": [
|
| 28 |
-
"output": [
|
| 29 |
}
|
| 30 |
)
|
| 31 |
st.dataframe(
|
|
|
|
| 1 |
+
# coding: utf-8
|
| 2 |
+
|
| 3 |
+
# Author: Du Mingzhe ([email protected])
|
| 4 |
+
# Date: 2025-04-01
|
| 5 |
+
|
| 6 |
+
import json
|
| 7 |
import random
|
| 8 |
import pandas as pd
|
| 9 |
import streamlit as st
|
|
|
|
| 28 |
st.markdown(problem_instance["question_content"])
|
| 29 |
|
| 30 |
with st.expander("Test Cases"):
|
| 31 |
+
test_cases = json.loads(problem_instance["test_cases"])
|
| 32 |
df = pd.DataFrame(
|
| 33 |
{
|
| 34 |
+
"input": [test_case['input'] for test_case in test_cases],
|
| 35 |
+
"output": [test_case['output'] for test_case in test_cases],
|
| 36 |
}
|
| 37 |
)
|
| 38 |
st.dataframe(
|