Anne31415 commited on
Commit
09c08c1
·
1 Parent(s): a4fe14d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -47,9 +47,12 @@ cloud_button_style = """
47
  st.markdown(cloud_button_style, unsafe_allow_html=True)
48
 
49
  def cloud_button(label, key):
50
- button_id = f"button_{key}"
51
- if st.button(label, key=button_id, use_container_width=True, **{"class": "cloud-button"}):
52
- st.session_state[button_id] = True
 
 
 
53
 
54
 
55
 
@@ -158,6 +161,8 @@ def main():
158
 
159
  if st.markdown('<button class="cloud-button">Was genau ist ein Belegarzt?</button>', unsafe_allow_html=True):
160
  query = "Was genau ist ein Belegarzt?"
 
 
161
  if st.button("Was sind die Vorteile des ambulanten operierens?"):
162
  query = "Was sind die Vorteile des ambulanten operierens?"
163
  if st.button("Was kann ich mit dem Prognose-Analyse Toll machen?"):
 
47
  st.markdown(cloud_button_style, unsafe_allow_html=True)
48
 
49
  def cloud_button(label, key):
50
+ button_html = f'<button type="button" class="cloud-button">{label}</button>'
51
+ button_click = st.markdown(button_html, unsafe_allow_html=True)
52
+ if button_click:
53
+ st.session_state[key] = not st.session_state.get(key, False)
54
+ return st.session_state.get(key, False)
55
+
56
 
57
 
58
 
 
161
 
162
  if st.markdown('<button class="cloud-button">Was genau ist ein Belegarzt?</button>', unsafe_allow_html=True):
163
  query = "Was genau ist ein Belegarzt?"
164
+ if cloud_button("Wofür wird die Alpha-ID verwendet?", "alpha_id"):
165
+ query = "Wofür wird die Alpha-ID verwendet?"
166
  if st.button("Was sind die Vorteile des ambulanten operierens?"):
167
  query = "Was sind die Vorteile des ambulanten operierens?"
168
  if st.button("Was kann ich mit dem Prognose-Analyse Toll machen?"):