Jintonic92 commited on
Commit
90aad90
Β·
verified Β·
1 Parent(s): 7f45df0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -191,6 +191,7 @@ latex_formatter = LatexFormatter()
191
  def display_math_content(content: str):
192
  """μˆ˜ν•™ λ‚΄μš©μ„ 화면에 ν‘œμ‹œ"""
193
  formatted_content = latex_formatter.format_expression(content)
 
194
  st.markdown(formatted_content, unsafe_allow_html=True)
195
 
196
  def format_answer_choice(choice: str) -> str:
@@ -228,19 +229,20 @@ def main():
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
  # 볡슡 ν™”λ©΄
245
  elif st.session_state.current_step == 'review':
246
  st.write("### ν•™μŠ΅ κ²°κ³Ό")
 
191
  def display_math_content(content: str):
192
  """μˆ˜ν•™ λ‚΄μš©μ„ 화면에 ν‘œμ‹œ"""
193
  formatted_content = latex_formatter.format_expression(content)
194
+ st.latex(formatted_content)
195
  st.markdown(formatted_content, unsafe_allow_html=True)
196
 
197
  def format_answer_choice(choice: str) -> str:
 
229
  # 보기 ν‘œμ‹œ
230
  col1, col2 = st.columns(2)
231
  with col1:
232
+ if st.button(f"A) {latex_formatter.format_expression(current_q['AnswerAText'])}", key="A"):
233
  handle_answer('A', current_q)
234
  st.rerun()
235
+ if st.button(f"C) {latex_formatter.format_expression(current_q['AnswerCText'])}", key="C"):
236
  handle_answer('C', current_q)
237
  st.rerun()
238
  with col2:
239
+ if st.button(f"B) {latex_formatter.format_expression(current_q['AnswerBText'])}", key="B"):
240
  handle_answer('B', current_q)
241
  st.rerun()
242
+ if st.button(f"D) {latex_formatter.format_expression(current_q['AnswerDText'])}", key="D"):
243
  handle_answer('D', current_q)
244
  st.rerun()
245
+
246
  # 볡슡 ν™”λ©΄
247
  elif st.session_state.current_step == 'review':
248
  st.write("### ν•™μŠ΅ κ²°κ³Ό")