GSMEthesis commited on
Commit
ad93271
·
verified ·
1 Parent(s): dfc842a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -2
app.py CHANGED
@@ -846,9 +846,23 @@ def show_explanation(exp_type):
846
  }
847
 
848
  if exp_type != "control":
849
- st.markdown("<p class='explanation-title'>علت قیمت گذاری:</p>", unsafe_allow_html=True)
 
 
 
 
 
 
 
850
  for item in explanations.get(exp_type, []):
851
- st.markdown(f"<p class='explanation-item'>• {item}</p>", unsafe_allow_html=True)
 
 
 
 
 
 
 
852
 
853
  def create_likert_question(question, key, scale_type="5point"):
854
  """نمایش سوال لیکرت با اسلایدر نقطه‌ای"""
 
846
  }
847
 
848
  if exp_type != "control":
849
+ if exp_type == "input":
850
+ st.markdown("""
851
+ <div style="direction: rtl; text-align: right;">
852
+ <span style="font-weight: bold;">علت قیمت گذاری</span>
853
+ <span style="font-size: 0.9em; color: #666;">(تعداد علامت + نشان دهنده شدت اثر عامل بر قیمت است)</span>
854
+ </div>
855
+ """, unsafe_allow_html=True)
856
+
857
  for item in explanations.get(exp_type, []):
858
+ st.markdown(f"<div style='direction: rtl; text-align: right; margin-right: 15px;'>• {item}</div>",
859
+ unsafe_allow_html=True)
860
+
861
+ elif exp_type == "counterfactual":
862
+ st.markdown("<div style='direction: rtl; text-align: right; font-weight: bold;'>علت قیمت گذاری:</div>",
863
+ unsafe_allow_html=True)
864
+ st.markdown(f"<div style='direction: rtl; text-align: right; margin-right: 15px;'>• {explanations[exp_type][0]}</div>",
865
+ unsafe_allow_html=True)
866
 
867
  def create_likert_question(question, key, scale_type="5point"):
868
  """نمایش سوال لیکرت با اسلایدر نقطه‌ای"""