Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -224,40 +224,21 @@ def main():
|
|
224 |
st.markdown("---")
|
225 |
#display_math_question(current_q['QuestionText'])
|
226 |
display_math_content(current_q['QuestionText']) # display_math_question 대신 display_math_content 사용
|
227 |
-
|
228 |
-
#st.write(current_q['QuestionText'])
|
229 |
-
|
230 |
-
# # 보기 표시
|
231 |
-
# col1, col2 = st.columns(2)
|
232 |
-
# with col1:
|
233 |
-
# if st.button(f"A) {current_q['AnswerAText']}", key="A"):
|
234 |
-
# handle_answer('A', current_q)
|
235 |
-
# st.rerun()
|
236 |
-
# if st.button(f"C) {current_q['AnswerCText']}", key="C"):
|
237 |
-
# handle_answer('C', current_q)
|
238 |
-
# st.rerun()
|
239 |
-
# with col2:
|
240 |
-
# if st.button(f"B) {current_q['AnswerBText']}", key="B"):
|
241 |
-
# handle_answer('B', current_q)
|
242 |
-
# st.rerun()
|
243 |
-
# if st.button(f"D) {current_q['AnswerDText']}", key="D"):
|
244 |
-
# handle_answer('D', current_q)
|
245 |
-
# st.rerun()
|
246 |
|
247 |
# 보기 표시
|
248 |
col1, col2 = st.columns(2)
|
249 |
with col1:
|
250 |
-
if st.button(
|
251 |
handle_answer('A', current_q)
|
252 |
st.rerun()
|
253 |
-
if st.button(
|
254 |
handle_answer('C', current_q)
|
255 |
st.rerun()
|
256 |
with col2:
|
257 |
-
if st.button(
|
258 |
handle_answer('B', current_q)
|
259 |
st.rerun()
|
260 |
-
if st.button(
|
261 |
handle_answer('D', current_q)
|
262 |
st.rerun()
|
263 |
# 복습 화면
|
@@ -373,7 +354,7 @@ def main():
|
|
373 |
with col1:
|
374 |
for option in ['A', 'C']:
|
375 |
if st.button(
|
376 |
-
f"{option}) {
|
377 |
key=f"similar_{option}_{i}"
|
378 |
):
|
379 |
st.session_state[f"similar_question_answered_{i}"] = True
|
|
|
224 |
st.markdown("---")
|
225 |
#display_math_question(current_q['QuestionText'])
|
226 |
display_math_content(current_q['QuestionText']) # display_math_question 대신 display_math_content 사용
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
|
228 |
# 보기 표시
|
229 |
col1, col2 = st.columns(2)
|
230 |
with col1:
|
231 |
+
if st.button(latex_formatter.format_expression(f"A) {current_q['AnswerAText']}"), key="A"):
|
232 |
handle_answer('A', current_q)
|
233 |
st.rerun()
|
234 |
+
if st.button(latex_formatter.format_expression(f"C) {current_q['AnswerCText']}"), key="C"):
|
235 |
handle_answer('C', current_q)
|
236 |
st.rerun()
|
237 |
with col2:
|
238 |
+
if st.button(latex_formatter.format_expression(f"B) {current_q['AnswerBText']}"), key="B"):
|
239 |
handle_answer('B', current_q)
|
240 |
st.rerun()
|
241 |
+
if st.button(latex_formatter.format_expression(f"D) {current_q['AnswerDText']}"), key="D"):
|
242 |
handle_answer('D', current_q)
|
243 |
st.rerun()
|
244 |
# 복습 화면
|
|
|
354 |
with col1:
|
355 |
for option in ['A', 'C']:
|
356 |
if st.button(
|
357 |
+
f"{option}) {latex_formatter.format_expression(new_question['choices'][option])}",
|
358 |
key=f"similar_{option}_{i}"
|
359 |
):
|
360 |
st.session_state[f"similar_question_answered_{i}"] = True
|