Jintonic92 commited on
Commit
ff8ff16
ยท
verified ยท
1 Parent(s): 8449d24

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -12
app.py CHANGED
@@ -421,22 +421,24 @@ def main():
421
  new_question = generate_similar_question(wrong_q, misconception_id, generator)
422
  if new_question:
423
  st.write("### ๐ŸŽฏ ์œ ์‚ฌ ๋ฌธ์ œ")
424
- #display_math_content(new_question['question']) # ํ•จ์ˆ˜ ๊ต์ฒด
425
 
426
  # ๋‹ต๋ณ€ ์ƒํƒœ ํ™•์ธ
427
  answered = st.session_state.get(f"similar_question_answered_{i}", False)
428
  #update_similar_question_display(new_question, i, answered)
429
-
430
- # ์ถ”๊ฐ€
431
- display_question(new_question['question'], new_question['choices'])
432
- st.session_state[f"similar_question_answered_{i}"] = True
433
- st.session_state[f"selected_answer_{i}"] = option
434
- correct_answer = st.session_state.get('current_similar_question_answer')
435
- if option == correct_answer:
436
- st.session_state[f"is_correct_{i}"] = True
437
- else:
438
- st.session_state[f"is_correct_{i}"] = False
439
- st.rerun()
 
 
440
 
441
  # ๋‹ต๋ณ€ํ•œ ๊ฒฝ์šฐ ๊ฒฐ๊ณผ ํ‘œ์‹œ
442
  if answered:
 
421
  new_question = generate_similar_question(wrong_q, misconception_id, generator)
422
  if new_question:
423
  st.write("### ๐ŸŽฏ ์œ ์‚ฌ ๋ฌธ์ œ")
424
+ display_math_content(new_question['question']) # ํ•จ์ˆ˜ ๊ต์ฒด
425
 
426
  # ๋‹ต๋ณ€ ์ƒํƒœ ํ™•์ธ
427
  answered = st.session_state.get(f"similar_question_answered_{i}", False)
428
  #update_similar_question_display(new_question, i, answered)
429
+ # ์„ ํƒํ•œ ์˜ต์…˜์„ ์ฒ˜๋ฆฌํ•˜๋Š” ํ•จ์ˆ˜๋ฅผ ํ˜ธ์ถœ
430
+ update_similar_question_display(new_question, i)
431
+
432
+ # # ์ถ”๊ฐ€
433
+ # display_question(new_question['question'], new_question['choices'])
434
+ # st.session_state[f"similar_question_answered_{i}"] = True
435
+ # st.session_state[f"selected_answer_{i}"] = option
436
+ # correct_answer = st.session_state.get('current_similar_question_answer')
437
+ # if option == correct_answer:
438
+ # st.session_state[f"is_correct_{i}"] = True
439
+ # else:
440
+ # st.session_state[f"is_correct_{i}"] = False
441
+ # st.rerun()
442
 
443
  # ๋‹ต๋ณ€ํ•œ ๊ฒฝ์šฐ ๊ฒฐ๊ณผ ํ‘œ์‹œ
444
  if answered: