Spaces:
Paused
Paused
Maryam Ilka commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -94,6 +94,18 @@ st.markdown("""
|
|
| 94 |
display: inline-block;
|
| 95 |
margin-left: 10px;
|
| 96 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
</style>
|
| 98 |
""", unsafe_allow_html=True)
|
| 99 |
|
|
@@ -145,9 +157,9 @@ def show_explanation(exp_type):
|
|
| 145 |
}
|
| 146 |
|
| 147 |
if exp_type != "control":
|
| 148 |
-
st.markdown("<p
|
| 149 |
for item in explanations.get(exp_type, []):
|
| 150 |
-
st.markdown(f"<p
|
| 151 |
|
| 152 |
# ========== توابع مدیریت دادهها ==========
|
| 153 |
def get_credentials():
|
|
@@ -402,23 +414,27 @@ def thank_you_page():
|
|
| 402 |
st.rerun()
|
| 403 |
|
| 404 |
# ========== مدیریت وضعیت و صفحهبندی ==========
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
|
| 408 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 409 |
|
| 410 |
-
# نمایش صفحه فعلی
|
| 411 |
-
pages = {
|
| 412 |
-
|
| 413 |
-
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
}
|
| 420 |
|
| 421 |
-
pages[st.session_state.current_page]()
|
| 422 |
|
| 423 |
if __name__ == "__main__":
|
| 424 |
main()
|
|
|
|
| 94 |
display: inline-block;
|
| 95 |
margin-left: 10px;
|
| 96 |
}
|
| 97 |
+
|
| 98 |
+
.explanation-title {
|
| 99 |
+
color: #6a0dad;
|
| 100 |
+
font-weight: bold;
|
| 101 |
+
margin-top: 20px;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
.explanation-item {
|
| 105 |
+
margin: 10px 0;
|
| 106 |
+
padding-right: 15px;
|
| 107 |
+
border-right: 3px solid #6a0dad;
|
| 108 |
+
}
|
| 109 |
</style>
|
| 110 |
""", unsafe_allow_html=True)
|
| 111 |
|
|
|
|
| 157 |
}
|
| 158 |
|
| 159 |
if exp_type != "control":
|
| 160 |
+
st.markdown("<p class='explanation-title'>علت قیمت گذاری:</p>", unsafe_allow_html=True)
|
| 161 |
for item in explanations.get(exp_type, []):
|
| 162 |
+
st.markdown(f"<p class='explanation-item'>• {item}</p>", unsafe_allow_html=True)
|
| 163 |
|
| 164 |
# ========== توابع مدیریت دادهها ==========
|
| 165 |
def get_credentials():
|
|
|
|
| 414 |
st.rerun()
|
| 415 |
|
| 416 |
# ========== مدیریت وضعیت و صفحهبندی ==========
|
| 417 |
+
def main():
|
| 418 |
+
if 'current_page' not in st.session_state:
|
| 419 |
+
st.session_state.current_page = "welcome"
|
| 420 |
+
st.session_state.scenario_type = random.choice(["control", "input", "counterfactual"])
|
| 421 |
+
st.session_state.price = 200000 # قیمت ثابت 200 هزار تومان
|
| 422 |
+
st.session_state.demographic_data = None
|
| 423 |
+
st.session_state.transparency_answers = []
|
| 424 |
+
st.session_state.fairness_answers = []
|
| 425 |
|
| 426 |
+
# نمایش صفحه فعلی
|
| 427 |
+
pages = {
|
| 428 |
+
"welcome": welcome_page,
|
| 429 |
+
"demographic": demographic_form,
|
| 430 |
+
"scenario_explanation": scenario_explanation,
|
| 431 |
+
"map_view": map_view,
|
| 432 |
+
"transparency_questions": transparency_questions,
|
| 433 |
+
"fairness_questions": fairness_questions,
|
| 434 |
+
"thank_you": thank_you_page
|
| 435 |
+
}
|
| 436 |
|
| 437 |
+
pages[st.session_state.current_page]()
|
| 438 |
|
| 439 |
if __name__ == "__main__":
|
| 440 |
main()
|