Anne31415 commited on
Commit
d796104
·
1 Parent(s): 10a642d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +55 -9
app.py CHANGED
@@ -12,6 +12,58 @@ from langchain.chains.question_answering import load_qa_chain
12
  from langchain.callbacks import get_openai_callback
13
  import os
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  # Step 1: Clone the Dataset Repository
16
  repo = Repository(
17
  local_dir="Private_Book", # Local directory to clone the repository
@@ -125,18 +177,12 @@ def main():
125
  if pdf_path is not None:
126
  query = st.text_input("Ask questions about your PDF file (in any preferred language):")
127
 
128
- if st.button("Was genau ist ein Belegarzt?"):
 
129
  query = "Was genau ist ein Belegarzt?"
130
  if st.button("Wofür wird die Alpha-ID verwendet?"):
131
  query = "Wofür wird die Alpha-ID verwendet?"
132
- if st.button("Was sind die Vorteile des ambulanten operierens?"):
133
- query = "Was sind die Vorteile des ambulanten operierens?"
134
- if st.button("Was kann ich mit dem Prognose-Analyse Toll machen?"):
135
- query = "Was kann ich mit dem Prognose-Analyse Toll machen?"
136
- if st.button("Was sagt mir die Farbe der Balken der Bevölkerungsentwicklung?"):
137
- query = "Was sagt mir die Farbe der Balken der Bevölkerungsentwicklung?"
138
- if st.button("Ich habe mein Meta Password vergessen, wie kann ich es zurücksetzen?"):
139
- query = ("Ich habe mein Meta Password vergessen, wie kann ich es zurücksetzen?")
140
 
141
 
142
  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]):
 
12
  from langchain.callbacks import get_openai_callback
13
  import os
14
 
15
+ st.markdown("""
16
+ <style>
17
+ .cloud-button {
18
+ position: relative;
19
+ background: #E0E0E0;
20
+ border: none;
21
+ padding: 20px 40px;
22
+ cursor: pointer;
23
+ overflow: hidden;
24
+ outline: none;
25
+ box-shadow: 2px 2px 12px rgba(0,0,0,0.1);
26
+ }
27
+
28
+ /* Main cloud shape */
29
+ .cloud-button::before {
30
+ content: '';
31
+ position: absolute;
32
+ background: #E0E0E0;
33
+ border-radius: 50%;
34
+ width: 150px;
35
+ height: 150px;
36
+ top: -50px;
37
+ left: 50%;
38
+ transform: translateX(-50%);
39
+ }
40
+
41
+ /* Additional cloud bubbles */
42
+ .cloud-button::after {
43
+ content: '';
44
+ position: absolute;
45
+ background: #E0E0E0;
46
+ border-radius: 50%;
47
+ width: 120px;
48
+ height: 120px;
49
+ top: 20px;
50
+ left: 15%;
51
+ }
52
+
53
+ .cloud-button span {
54
+ position: relative;
55
+ z-index: 1;
56
+ }
57
+
58
+ /* Hover effect */
59
+ .cloud-button:hover {
60
+ box-shadow: 2px 2px 18px rgba(0,0,0,0.2);
61
+ }
62
+ </style>
63
+
64
+ """, unsafe_allow_html=True)
65
+
66
+
67
  # Step 1: Clone the Dataset Repository
68
  repo = Repository(
69
  local_dir="Private_Book", # Local directory to clone the repository
 
177
  if pdf_path is not None:
178
  query = st.text_input("Ask questions about your PDF file (in any preferred language):")
179
 
180
+ # Replace st.button() with the cloud-shaped button using markdown
181
+ if st.markdown('<button class="cloud-button"><span>Was genau ist ein Belegarzt?</span></button>', unsafe_allow_html=True):
182
  query = "Was genau ist ein Belegarzt?"
183
  if st.button("Wofür wird die Alpha-ID verwendet?"):
184
  query = "Wofür wird die Alpha-ID verwendet?"
185
+
 
 
 
 
 
 
 
186
 
187
 
188
  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]):