Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -255,17 +255,31 @@ def add_custom_css():
|
|
255 |
|
256 |
|
257 |
# 2210
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
def display_question(question, answers):
|
259 |
-
"""Display a math problem and its options"""
|
260 |
st.markdown('<div class="problem-header">Problem:</div>', unsafe_allow_html=True)
|
261 |
-
display_math_content(question)
|
|
|
262 |
col1, col2 = st.columns(2)
|
263 |
for i, (col, opt) in enumerate([(col1, 'A'), (col1, 'C'), (col2, 'B'), (col2, 'D')]):
|
264 |
with col:
|
265 |
-
|
|
|
266 |
handle_answer(opt, st.session_state.questions.iloc[st.session_state.current_question_index])
|
267 |
st.rerun()
|
268 |
-
|
269 |
|
270 |
def main():
|
271 |
"""๋ฉ์ธ ์ ํ๋ฆฌ์ผ์ด์
๋ก์ง"""
|
|
|
255 |
|
256 |
|
257 |
# 2210
|
258 |
+
# def display_question(question, answers):
|
259 |
+
# """Display a math problem and its options"""
|
260 |
+
# st.markdown('<div class="problem-header">Problem:</div>', unsafe_allow_html=True)
|
261 |
+
# display_math_content(question) # ๋ฌธ์ ๋ ๋๋ง
|
262 |
+
# col1, col2 = st.columns(2)
|
263 |
+
# for i, (col, opt) in enumerate([(col1, 'A'), (col1, 'C'), (col2, 'B'), (col2, 'D')]):
|
264 |
+
# with col:
|
265 |
+
# if st.button(opt, key=f"btn_{opt}"): # ๊ดํธ ์ ๊ฑฐ
|
266 |
+
# handle_answer(opt, st.session_state.questions.iloc[st.session_state.current_question_index])
|
267 |
+
# st.rerun()
|
268 |
+
# display_math_content(answers[opt]) # ๋ณด๊ธฐ LaTeX ๋ ๋๋ง
|
269 |
+
|
270 |
def display_question(question, answers):
|
271 |
+
"""Display a math problem and its options with LaTeX formatting"""
|
272 |
st.markdown('<div class="problem-header">Problem:</div>', unsafe_allow_html=True)
|
273 |
+
display_math_content(question)
|
274 |
+
|
275 |
col1, col2 = st.columns(2)
|
276 |
for i, (col, opt) in enumerate([(col1, 'A'), (col1, 'C'), (col2, 'B'), (col2, 'D')]):
|
277 |
with col:
|
278 |
+
answer_text = answers[opt]
|
279 |
+
if st.button(answer_text, key=f"btn_{opt}"):
|
280 |
handle_answer(opt, st.session_state.questions.iloc[st.session_state.current_question_index])
|
281 |
st.rerun()
|
282 |
+
|
283 |
|
284 |
def main():
|
285 |
"""๋ฉ์ธ ์ ํ๋ฆฌ์ผ์ด์
๋ก์ง"""
|