Anne31415 commited on
Commit
9c45b9d
·
1 Parent(s): 8a1f468

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +32 -1
app.py CHANGED
@@ -12,6 +12,37 @@ 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
@@ -115,7 +146,7 @@ def main():
115
  if pdf_path is not None:
116
  query = st.text_input("Ask questions about your PDF file (in any preferred language):")
117
 
118
- if st.button("Was genau ist ein Belegarzt?"):
119
  query = "Was genau ist ein Belegarzt?"
120
  if st.button("Wofür wird die Alpha-ID verwendet?"):
121
  query = "Wofür wird die Alpha-ID verwendet?"
 
12
  from langchain.callbacks import get_openai_callback
13
  import os
14
 
15
+
16
+ # Define the custom CSS style for cloud-shaped buttons
17
+ cloud_button_style = """
18
+ <style>
19
+ .cloud-button {
20
+ display: inline-block;
21
+ padding: 8px 15px;
22
+ font-size: 16px;
23
+ cursor: pointer;
24
+ text-align: center;
25
+ text-decoration: none;
26
+ outline: none;
27
+ color: #fff;
28
+ background-color: #4CAF50;
29
+ border: none;
30
+ border-radius: 15px;
31
+ box-shadow: 0 9px #999;
32
+ margin: 5px;
33
+ }
34
+
35
+ .cloud-button:hover {background-color: #3e8e41}
36
+
37
+ .cloud-button:active {
38
+ background-color: #3e8e41;
39
+ box-shadow: 0 5px #666;
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
 
146
  if pdf_path is not None:
147
  query = st.text_input("Ask questions about your PDF file (in any preferred language):")
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?"