Sina Media Lab commited on
Commit
085d082
Β·
1 Parent(s): 8e6cd67
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -53,9 +53,9 @@ def generate_pdf_report():
53
  pdf.multi_cell(0, 10, f"Q{idx+1}: {question}")
54
  for option in options:
55
  if option == correct:
56
- pdf.multi_cell(0, 10, f"βœ” {option} (Correct)")
57
  elif option == selected:
58
- pdf.multi_cell(0, 10, f"✘ {option} (Your Choice)")
59
  else:
60
  pdf.multi_cell(0, 10, f" {option}")
61
  pdf.multi_cell(0, 10, f"Explanation: {explanation}")
@@ -99,7 +99,7 @@ if module_name:
99
  st.title(title)
100
  st.write(description)
101
 
102
- # Display the "Next" and "Download PDF Report" buttons above the question
103
  col1, col2, col3 = st.columns([1, 1, 2])
104
  with col1:
105
  if st.session_state.submitted:
@@ -155,9 +155,9 @@ if module_name:
155
 
156
  if st.session_state.selected_answer == st.session_state.correct_answer:
157
  st.session_state.correct_count += 1
158
- st.success("βœ” Correct!")
159
  else:
160
- st.error("✘ Incorrect.")
161
 
162
  logging.info("Answer submitted.")
163
  logging.info(f"Selected Answer: {st.session_state.selected_answer}")
 
53
  pdf.multi_cell(0, 10, f"Q{idx+1}: {question}")
54
  for option in options:
55
  if option == correct:
56
+ pdf.multi_cell(0, 10, f"Correct: {option}")
57
  elif option == selected:
58
+ pdf.multi_cell(0, 10, f"Your Choice: {option}")
59
  else:
60
  pdf.multi_cell(0, 10, f" {option}")
61
  pdf.multi_cell(0, 10, f"Explanation: {explanation}")
 
99
  st.title(title)
100
  st.write(description)
101
 
102
+ # Display the "Next", "Prev", and "Download PDF Report" buttons above the question
103
  col1, col2, col3 = st.columns([1, 1, 2])
104
  with col1:
105
  if st.session_state.submitted:
 
155
 
156
  if st.session_state.selected_answer == st.session_state.correct_answer:
157
  st.session_state.correct_count += 1
158
+ st.success("Correct!")
159
  else:
160
+ st.error("Incorrect.")
161
 
162
  logging.info("Answer submitted.")
163
  logging.info(f"Selected Answer: {st.session_state.selected_answer}")