Update app.py
Browse files
app.py
CHANGED
@@ -527,16 +527,16 @@ with col1:
|
|
527 |
story_display = st.container()
|
528 |
|
529 |
with story_display:
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
|
541 |
# User Input Box
|
542 |
st.markdown("""
|
|
|
527 |
story_display = st.container()
|
528 |
|
529 |
with story_display:
|
530 |
+
if not st.session_state.story:
|
531 |
+
st.info("เริ่มต้นผจญภัยด้วยการเขียนประโยคแรกกันเลย! | Start your adventure by writing the first sentence!")
|
532 |
+
else:
|
533 |
+
for idx, entry in enumerate(st.session_state.story):
|
534 |
+
if entry['role'] == 'You':
|
535 |
+
# ถ้าประโยคถูกแก้ไขแล้ว แสดงไอคอนดินสอ
|
536 |
+
correction_status = "✍️ " if entry.get('is_corrected') else ""
|
537 |
+
st.write(f"👤 You: {correction_status}{entry['content']}")
|
538 |
+
elif entry['role'] == 'AI':
|
539 |
+
st.write("🤖 AI:", entry['content'])
|
540 |
|
541 |
# User Input Box
|
542 |
st.markdown("""
|