GSMEthesis commited on
Commit
6bbb1f3
·
verified ·
1 Parent(s): e123d09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -3
app.py CHANGED
@@ -757,6 +757,10 @@ def enhanced_likert_scale(question_data):
757
  # ایجاد خط و نقاط با HTML/CSS
758
  scale_html = f"""
759
  <style>
 
 
 
 
760
  .likert-line {{
761
  width: 80%;
762
  height: 2px;
@@ -786,7 +790,15 @@ def enhanced_likert_scale(question_data):
786
  justify-content: space-between;
787
  direction: rtl;
788
  font-size: 14px;
789
- color: #555;
 
 
 
 
 
 
 
 
790
  }}
791
  @media (max-width: 768px) {{
792
  .likert-line {{
@@ -820,8 +832,8 @@ def enhanced_likert_scale(question_data):
820
  value = st.number_input(
821
  "مقدار را وارد کنید (از 1 تا 7):",
822
  min_value=1,
823
- max_value=7,
824
- value=st.session_state.get(key),
825
  step=1,
826
  key=f"{key}_input",
827
  placeholder="لطفاً از 1 (کمترین) تا 7 (بیشترین) انتخاب کنید",
@@ -829,6 +841,9 @@ def enhanced_likert_scale(question_data):
829
  on_change=lambda: st.session_state.update({key: st.session_state[f"{key}_input"]})
830
  )
831
 
 
 
 
832
  return st.session_state.get(key)
833
 
834
  def create_ride_map():
 
757
  # ایجاد خط و نقاط با HTML/CSS
758
  scale_html = f"""
759
  <style>
760
+ @font-face {{
761
+ font-family: 'Vazir';
762
+ src: url('https://cdn.fontcdn.ir/Font/Persian/Vazir/Vazir-Bold.woff2') format('woff2');
763
+ }}
764
  .likert-line {{
765
  width: 80%;
766
  height: 2px;
 
790
  justify-content: space-between;
791
  direction: rtl;
792
  font-size: 14px;
793
+ font-family: 'Vazir', sans-serif;
794
+ font-weight: bold;
795
+ color: #6a0dad;
796
+ }}
797
+ .separator-line {{
798
+ width: 80%;
799
+ height: 2px;
800
+ background: #6a0dad;
801
+ margin: 20px auto;
802
  }}
803
  @media (max-width: 768px) {{
804
  .likert-line {{
 
832
  value = st.number_input(
833
  "مقدار را وارد کنید (از 1 تا 7):",
834
  min_value=1,
835
+ max_value=scale,
836
+ value=0 if st.session_state.get(key) is None else st.session_state.get(key),
837
  step=1,
838
  key=f"{key}_input",
839
  placeholder="لطفاً از 1 (کمترین) تا 7 (بیشترین) انتخاب کنید",
 
841
  on_change=lambda: st.session_state.update({key: st.session_state[f"{key}_input"]})
842
  )
843
 
844
+ # خط جداکننده بنفش
845
+ st.markdown('<div class="separator-line"></div>', unsafe_allow_html=True)
846
+
847
  return st.session_state.get(key)
848
 
849
  def create_ride_map():