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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -9
app.py CHANGED
@@ -16,9 +16,11 @@ import os
16
  cloud_button_style = """
17
  <style>
18
  .cloud-button {
19
- display: inline-block;
20
- padding: 10px 20px;
21
- font-size: 16px;
 
 
22
  cursor: pointer;
23
  text-align: center;
24
  text-decoration: none;
@@ -26,8 +28,8 @@ cloud_button_style = """
26
  color: #fff;
27
  background-color: #add8e6;
28
  border: none;
29
- border-radius: 25px;
30
- box-shadow: 0 8px 16px rgba(0,0,0,0.1), 0 16px 32px rgba(0,0,0,0.1), 0 24px 48px rgba(0,0,0,0.1), 0 32px 64px rgba(0,0,0,0.1);
31
  margin: 5px;
32
  }
33
 
@@ -36,13 +38,21 @@ cloud_button_style = """
36
  }
37
 
38
  .cloud-button:active {
39
- box-shadow: 0 4px 8px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.1), 0 12px 24px rgba(0,0,0,0.1), 0 16px 32px rgba(0,0,0,0.1);
40
- transform: translateY(4px);
 
41
  }
42
  </style>
43
  """
44
  st.markdown(cloud_button_style, unsafe_allow_html=True)
45
 
 
 
 
 
 
 
 
46
  # Step 1: Clone the Dataset Repository
47
  repo = Repository(
48
  local_dir="Private_Book", # Local directory to clone the repository
@@ -148,8 +158,6 @@ def main():
148
 
149
  if st.markdown('<button class="cloud-button">Was genau ist ein Belegarzt?</button>', unsafe_allow_html=True):
150
  query = "Was genau ist ein Belegarzt?"
151
- if st.button("Wofür wird die Alpha-ID verwendet?"):
152
- query = "Wofür wird die Alpha-ID verwendet?"
153
  if st.button("Was sind die Vorteile des ambulanten operierens?"):
154
  query = "Was sind die Vorteile des ambulanten operierens?"
155
  if st.button("Was kann ich mit dem Prognose-Analyse Toll machen?"):
@@ -158,6 +166,8 @@ def main():
158
  query = "Was sagt mir die Farbe der Balken der Bevölkerungsentwicklung?"
159
  if st.button("Ich habe mein Meta Password vergessen, wie kann ich es zurücksetzen?"):
160
  query = ("Ich habe mein Meta Password vergessen, wie kann ich es zurücksetzen?")
 
 
161
 
162
 
163
  if st.button("Ask") or (not st.session_state['chat_history'] and query) or (st.session_state['chat_history'] and query != st.session_state['chat_history'][-1][1]):
 
16
  cloud_button_style = """
17
  <style>
18
  .cloud-button {
19
+ display: inline-flex;
20
+ align-items: center;
21
+ justify-content: center;
22
+ padding: 8px 15px;
23
+ font-size: 14px;
24
  cursor: pointer;
25
  text-align: center;
26
  text-decoration: none;
 
28
  color: #fff;
29
  background-color: #add8e6;
30
  border: none;
31
+ border-radius: 20px;
32
+ box-shadow: 0 5px 10px rgba(0,0,0,0.1);
33
  margin: 5px;
34
  }
35
 
 
38
  }
39
 
40
  .cloud-button:active {
41
+ background-color: #87b6a7;
42
+ box-shadow: 0 2px 5px rgba(0,0,0,0.1);
43
+ transform: translateY(2px);
44
  }
45
  </style>
46
  """
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
+
56
  # Step 1: Clone the Dataset Repository
57
  repo = Repository(
58
  local_dir="Private_Book", # Local directory to clone the repository
 
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?"):
 
166
  query = "Was sagt mir die Farbe der Balken der Bevölkerungsentwicklung?"
167
  if st.button("Ich habe mein Meta Password vergessen, wie kann ich es zurücksetzen?"):
168
  query = ("Ich habe mein Meta Password vergessen, wie kann ich es zurücksetzen?")
169
+ if cloud_button("Cloud Button Example"):
170
+ st.write("Cloud button was clicked!")
171
 
172
 
173
  if st.button("Ask") or (not st.session_state['chat_history'] and query) or (st.session_state['chat_history'] and query != st.session_state['chat_history'][-1][1]):