Spaces:
Paused
Paused
Maryam Ilka commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -537,15 +537,14 @@ def attention_check1():
|
|
| 537 |
""", unsafe_allow_html=True)
|
| 538 |
st.markdown("### سوال توجه")
|
| 539 |
|
| 540 |
-
|
| 541 |
"رنگ سازمانی اپلیکیشن رهیار چه رنگی بود؟",
|
| 542 |
["قرمز", "سبز", "بنفش", "آبی", "زرد"],
|
| 543 |
index=None,
|
| 544 |
key="attention_check1"
|
| 545 |
)
|
| 546 |
|
| 547 |
-
if
|
| 548 |
-
st.session_state.attention_check1 = attention_check1 # ذخیره در session_state
|
| 549 |
st.session_state.current_page = "random_likert_questions"
|
| 550 |
st.rerun()
|
| 551 |
|
|
@@ -561,15 +560,14 @@ def attention_check2():
|
|
| 561 |
""", unsafe_allow_html=True)
|
| 562 |
st.markdown("### سوال توجه")
|
| 563 |
|
| 564 |
-
|
| 565 |
"نام اپلیکیشنی که در این تحقیق بررسی میشود چیست؟",
|
| 566 |
["اسنپ", "تپسی", "راهیار", "ماکسیم", "دیگر"],
|
| 567 |
index=None,
|
| 568 |
key="attention_check2"
|
| 569 |
)
|
| 570 |
|
| 571 |
-
if
|
| 572 |
-
st.session_state.attention_check2 = attention_check2 # ذخیره در session_state
|
| 573 |
st.session_state.current_page = "explanation_questions"
|
| 574 |
st.rerun()
|
| 575 |
|
|
@@ -673,8 +671,8 @@ def explanation_questions():
|
|
| 673 |
"price": st.session_state.price,
|
| 674 |
"user_contact": st.session_state.get("user_contact", ""),
|
| 675 |
"price_accepted": st.session_state.get("price_accepted", 0),
|
| 676 |
-
"attention_check1": st.session_state.
|
| 677 |
-
"attention_check2": st.session_state.
|
| 678 |
"explanation_received": explanation_received,
|
| 679 |
"explanation_type": explanation_type if explanation_received == "بله" else "N/A",
|
| 680 |
**st.session_state.demographic_data
|
|
|
|
| 537 |
""", unsafe_allow_html=True)
|
| 538 |
st.markdown("### سوال توجه")
|
| 539 |
|
| 540 |
+
attention_answer = st.radio(
|
| 541 |
"رنگ سازمانی اپلیکیشن رهیار چه رنگی بود؟",
|
| 542 |
["قرمز", "سبز", "بنفش", "آبی", "زرد"],
|
| 543 |
index=None,
|
| 544 |
key="attention_check1"
|
| 545 |
)
|
| 546 |
|
| 547 |
+
if attention_answer: # فقط بررسی میکنیم که پاسخی داده شده باشد
|
|
|
|
| 548 |
st.session_state.current_page = "random_likert_questions"
|
| 549 |
st.rerun()
|
| 550 |
|
|
|
|
| 560 |
""", unsafe_allow_html=True)
|
| 561 |
st.markdown("### سوال توجه")
|
| 562 |
|
| 563 |
+
attention_answer = st.radio(
|
| 564 |
"نام اپلیکیشنی که در این تحقیق بررسی میشود چیست؟",
|
| 565 |
["اسنپ", "تپسی", "راهیار", "ماکسیم", "دیگر"],
|
| 566 |
index=None,
|
| 567 |
key="attention_check2"
|
| 568 |
)
|
| 569 |
|
| 570 |
+
if attention_answer: # فقط بررسی میکنیم که پاسخی داده شده باشد
|
|
|
|
| 571 |
st.session_state.current_page = "explanation_questions"
|
| 572 |
st.rerun()
|
| 573 |
|
|
|
|
| 671 |
"price": st.session_state.price,
|
| 672 |
"user_contact": st.session_state.get("user_contact", ""),
|
| 673 |
"price_accepted": st.session_state.get("price_accepted", 0),
|
| 674 |
+
"attention_check1": st.session_state.attention_check1 if "attention_check1" in st.session_state else "",
|
| 675 |
+
"attention_check2": st.session_state.attention_check2 if "attention_check2" in st.session_state else "",
|
| 676 |
"explanation_received": explanation_received,
|
| 677 |
"explanation_type": explanation_type if explanation_received == "بله" else "N/A",
|
| 678 |
**st.session_state.demographic_data
|