Spaces:
Paused
Paused
Maryam Ilka commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -474,6 +474,60 @@ def user_contact():
|
|
| 474 |
|
| 475 |
def demographic_form():
|
| 476 |
"""فرم اطلاعات دموگرافیک"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 477 |
with st.form("demographic"):
|
| 478 |
st.header("📝 اطلاعات دموگرافیک")
|
| 479 |
age = st.number_input("سن", min_value=18, max_value=100)
|
|
@@ -482,7 +536,7 @@ def demographic_form():
|
|
| 482 |
ride_frequency = st.selectbox("دفعات استفاده از سرویسهای اشتراک سفر در ماه",
|
| 483 |
["کمتر از 5 بار", "5-10 بار", "بیش از 10 بار"])
|
| 484 |
|
| 485 |
-
|
| 486 |
st.session_state.demographic_data = {
|
| 487 |
"age": age,
|
| 488 |
"gender": gender,
|
|
|
|
| 474 |
|
| 475 |
def demographic_form():
|
| 476 |
"""فرم اطلاعات دموگرافیک"""
|
| 477 |
+
st.markdown("""
|
| 478 |
+
<style>
|
| 479 |
+
/* استایل کلی تمام inputها */
|
| 480 |
+
.stNumberInput input,
|
| 481 |
+
.stSelectbox select,
|
| 482 |
+
.stTextInput input {
|
| 483 |
+
color: #333333 !important;
|
| 484 |
+
background-color: white !important;
|
| 485 |
+
border: 1px solid #6a0dad !important;
|
| 486 |
+
border-radius: 8px !important;
|
| 487 |
+
padding: 8px 12px !important;
|
| 488 |
+
font-family: 'Vazir' !important;
|
| 489 |
+
}
|
| 490 |
+
|
| 491 |
+
/* استایل placeholder */
|
| 492 |
+
.stNumberInput input::placeholder,
|
| 493 |
+
.stTextInput input::placeholder {
|
| 494 |
+
color: #333333 !important;
|
| 495 |
+
opacity: 1 !important;
|
| 496 |
+
}
|
| 497 |
+
|
| 498 |
+
/* استایل dropdown options */
|
| 499 |
+
.stSelectbox select option {
|
| 500 |
+
color: #333333 !important;
|
| 501 |
+
background-color: white !important;
|
| 502 |
+
}
|
| 503 |
+
|
| 504 |
+
/* استایل دکمه submit */
|
| 505 |
+
.stFormSubmitButton button {
|
| 506 |
+
background-color: #6a0dad !important;
|
| 507 |
+
color: white !important;
|
| 508 |
+
border: none !important;
|
| 509 |
+
border-radius: 8px !important;
|
| 510 |
+
padding: 10px 24px !important;
|
| 511 |
+
font-family: 'Vazir' !important;
|
| 512 |
+
font-weight: bold !important;
|
| 513 |
+
transition: all 0.3s ease !important;
|
| 514 |
+
}
|
| 515 |
+
|
| 516 |
+
.stFormSubmitButton button:hover {
|
| 517 |
+
background-color: #7b1fa2 !important;
|
| 518 |
+
transform: translateY(-2px);
|
| 519 |
+
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
|
| 520 |
+
}
|
| 521 |
+
|
| 522 |
+
/* استایل hover برای inputها */
|
| 523 |
+
.stNumberInput input:focus,
|
| 524 |
+
.stSelectbox select:focus {
|
| 525 |
+
border-color: #8e44ad !important;
|
| 526 |
+
box-shadow: 0 0 0 2px rgba(106, 13, 173, 0.2) !important;
|
| 527 |
+
outline: none !important;
|
| 528 |
+
}
|
| 529 |
+
</style>
|
| 530 |
+
""", unsafe_allow_html=True)
|
| 531 |
with st.form("demographic"):
|
| 532 |
st.header("📝 اطلاعات دموگرافیک")
|
| 533 |
age = st.number_input("سن", min_value=18, max_value=100)
|
|
|
|
| 536 |
ride_frequency = st.selectbox("دفعات استفاده از سرویسهای اشتراک سفر در ماه",
|
| 537 |
["کمتر از 5 بار", "5-10 بار", "بیش از 10 بار"])
|
| 538 |
|
| 539 |
+
if st.button("ادامه", key="continue_btn", type="primary"):
|
| 540 |
st.session_state.demographic_data = {
|
| 541 |
"age": age,
|
| 542 |
"gender": gender,
|