GSMEthesis commited on
Commit
19d2b1c
·
verified ·
1 Parent(s): c953ac0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -838,10 +838,10 @@ def enhanced_likert_scale(question_data):
838
  <script>
839
  function setLikertValue(value) {
840
  const streamlitDoc = window.parent.document;
841
- const buttons = streamlitDoc.querySelectorAll('button[data-testid="baseButton-secondary"]');
842
  buttons.forEach(btn => {
843
  if (btn.textContent.trim() === String(value)) {
844
- btn.click();
845
  }
846
  });
847
  }
@@ -865,6 +865,7 @@ def enhanced_likert_scale(question_data):
865
  return st.session_state.get(key)
866
 
867
 
 
868
  def create_ride_map():
869
  """ایجاد نقشه سفر با Folium - نسخه اصلاح شده با مناطق عمومی"""
870
  # نقاط تقریبی برای مناطق عمومی جنوب و غرب تهران
 
838
  <script>
839
  function setLikertValue(value) {
840
  const streamlitDoc = window.parent.document;
841
+ const buttons = streamlitDoc.querySelectorAll('button[data-testid="stButton"]'); // جستجوی دکمه‌ها در DOM
842
  buttons.forEach(btn => {
843
  if (btn.textContent.trim() === String(value)) {
844
+ btn.click(); // کلیک روی دکمه مورد نظر برای انتخاب مقدار
845
  }
846
  });
847
  }
 
865
  return st.session_state.get(key)
866
 
867
 
868
+
869
  def create_ride_map():
870
  """ایجاد نقشه سفر با Folium - نسخه اصلاح شده با مناطق عمومی"""
871
  # نقاط تقریبی برای مناطق عمومی جنوب و غرب تهران