Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -239,86 +239,6 @@ def main():
|
|
239 |
else:
|
240 |
st.info("Misconception μ λ³΄κ° μμ΅λλ€.")
|
241 |
|
242 |
-
# # μ μ¬ λ¬Έμ μμ± λ²νΌ
|
243 |
-
# if st.button(f"π μ μ¬ λ¬Έμ νκΈ° #{i + 1}", key=f"retry_{i}"):
|
244 |
-
# with st.spinner("μ μ¬ λ¬Έμ λ₯Ό μμ±νκ³ μμ΅λλ€..."):
|
245 |
-
# logger.info(f"Generating similar question for misconception_id: {misconception_id}")
|
246 |
-
# new_question = generate_similar_question(wrong_q, misconception_id, generator)
|
247 |
-
# if new_question:
|
248 |
-
# st.write("### π― μ μ¬ λ¬Έμ ")
|
249 |
-
# st.write(new_question['question'])
|
250 |
-
# st.write("**보기:**")
|
251 |
-
# for choice, text in new_question['choices'].items():
|
252 |
-
# st.write(f"{choice}) {text}")
|
253 |
-
# st.write("**β
μ λ΅:**", new_question['correct'])
|
254 |
-
# st.write("**π ν΄μ€:**", new_question['explanation'])
|
255 |
-
# else:
|
256 |
-
# st.error("μ μ¬ λ¬Έμ λ₯Ό μμ±ν μ μμ΅λλ€.")
|
257 |
-
|
258 |
-
# # μ μ¬ λ¬Έμ μμ± λ²νΌ
|
259 |
-
# if st.button(f"π μ μ¬ λ¬Έμ νκΈ° #{i + 1}", key=f"retry_{i}"):
|
260 |
-
# with st.spinner("μ μ¬ λ¬Έμ λ₯Ό μμ±νκ³ μμ΅λλ€..."):
|
261 |
-
# logger.info(f"Generating similar question for misconception_id: {misconception_id}")
|
262 |
-
# new_question = generate_similar_question(wrong_q, misconception_id, generator)
|
263 |
-
# if new_question:
|
264 |
-
# st.write("### π― μ μ¬ λ¬Έμ ")
|
265 |
-
# st.write(new_question['question'])
|
266 |
-
|
267 |
-
# # μ λ΅μ μΈμ
μ€ν
μ΄νΈμ μ μ₯
|
268 |
-
# if f"similar_question_answered_{i}" not in st.session_state:
|
269 |
-
# st.session_state[f"similar_question_answered_{i}"] = False
|
270 |
-
# if f"similar_question_correct_{i}" not in st.session_state:
|
271 |
-
# st.session_state[f"similar_question_correct_{i}"] = new_question['correct']
|
272 |
-
|
273 |
-
# # μμ§ λ΅λ³νμ§ μμ κ²½μ°μλ§ λ³΄κΈ° λ²νΌ νμ
|
274 |
-
# if not st.session_state[f"similar_question_answered_{i}"]:
|
275 |
-
# st.write("**보기:**")
|
276 |
-
# col1, col2 = st.columns(2)
|
277 |
-
# with col1:
|
278 |
-
# if st.button(f"A) {new_question['choices']['A']}", key=f"similar_A_{i}"):
|
279 |
-
# st.session_state[f"similar_question_answered_{i}"] = True
|
280 |
-
# if 'A' == new_question['correct']:
|
281 |
-
# st.success("β
μ λ΅μ
λλ€!")
|
282 |
-
# else:
|
283 |
-
# st.error("β νλ Έμ΅λλ€.")
|
284 |
-
# st.rerun()
|
285 |
-
|
286 |
-
# if st.button(f"C) {new_question['choices']['C']}", key=f"similar_C_{i}"):
|
287 |
-
# st.session_state[f"similar_question_answered_{i}"] = True
|
288 |
-
# if 'C' == new_question['correct']:
|
289 |
-
# st.success("β
μ λ΅μ
λλ€!")
|
290 |
-
# else:
|
291 |
-
# st.error("β νλ Έμ΅λλ€.")
|
292 |
-
# st.rerun()
|
293 |
-
|
294 |
-
# with col2:
|
295 |
-
# if st.button(f"B) {new_question['choices']['B']}", key=f"similar_B_{i}"):
|
296 |
-
# st.session_state[f"similar_question_answered_{i}"] = True
|
297 |
-
# if 'B' == new_question['correct']:
|
298 |
-
# st.success("β
μ λ΅μ
λλ€!")
|
299 |
-
# else:
|
300 |
-
# st.error("β νλ Έμ΅λλ€.")
|
301 |
-
# st.rerun()
|
302 |
-
|
303 |
-
# if st.button(f"D) {new_question['choices']['D']}", key=f"similar_D_{i}"):
|
304 |
-
# st.session_state[f"similar_question_answered_{i}"] = True
|
305 |
-
# if 'D' == new_question['correct']:
|
306 |
-
# st.success("β
μ λ΅μ
λλ€!")
|
307 |
-
# else:
|
308 |
-
# st.error("β νλ Έμ΅λλ€.")
|
309 |
-
# st.rerun()
|
310 |
-
|
311 |
-
# # λ΅λ³ν κ²½μ° κ²°κ³Ό λ° ν΄μ€ νμ
|
312 |
-
# if st.session_state[f"similar_question_answered_{i}"]:
|
313 |
-
# st.write("---")
|
314 |
-
# st.write("**π ν΄μ€:**", new_question['explanation'])
|
315 |
-
# # λ€μ νκΈ° λ²νΌ
|
316 |
-
# if st.button("π λ€μ νκΈ°", key=f"reset_{i}"):
|
317 |
-
# st.session_state[f"similar_question_answered_{i}"] = False
|
318 |
-
# st.rerun()
|
319 |
-
# else:
|
320 |
-
# st.error("μ μ¬ λ¬Έμ λ₯Ό μμ±ν μ μμ΅λλ€.")
|
321 |
-
|
322 |
# νλ¦° λ¬Έμ λΆμ λΆλΆμμ
|
323 |
if st.button(f"π μ μ¬ λ¬Έμ νκΈ° #{i + 1}", key=f"retry_{i}"):
|
324 |
# μ μ¬ λ¬Έμ μμ± μνλ₯Ό μΈμ
μ μ μ₯
|
|
|
239 |
else:
|
240 |
st.info("Misconception μ λ³΄κ° μμ΅λλ€.")
|
241 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
# νλ¦° λ¬Έμ λΆμ λΆλΆμμ
|
243 |
if st.button(f"π μ μ¬ λ¬Έμ νκΈ° #{i + 1}", key=f"retry_{i}"):
|
244 |
# μ μ¬ λ¬Έμ μμ± μνλ₯Ό μΈμ
μ μ μ₯
|