Anne31415 commited on
Commit
dc2c7bb
·
1 Parent(s): 1645e32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -25,6 +25,8 @@ pdf_file_path = "Private_Book/KOMBI_all2.pdf" # Replace with your PDF file path
25
 
26
 
27
 
 
 
28
  import streamlit as st
29
 
30
  def cloud_button(label, key=None, color=None):
@@ -47,7 +49,7 @@ def cloud_button(label, key=None, color=None):
47
  cloud_button_html = f"""
48
  <div class="cloud" id="{button_id}" style="margin-bottom: 20px;">
49
  {circles_html}
50
- <div class="rectangle {color_class}">{label}</div>
51
  </div>
52
  <style>
53
  .cloud {{
@@ -59,10 +61,7 @@ def cloud_button(label, key=None, color=None):
59
  font-size: 16px;
60
  white-space: nowrap;
61
  }}
62
- .rectangle {{
63
- min-width: 120px;
64
- height: auto;
65
- border-radius: 30px;
66
  position: relative;
67
  display: inline-flex;
68
  align-items: center;
@@ -71,6 +70,7 @@ def cloud_button(label, key=None, color=None):
71
  padding: 10px 20px;
72
  z-index: 2;
73
  transition: background-color 0.4s;
 
74
  }}
75
  .circle {{
76
  border-radius: 50%;
@@ -79,13 +79,13 @@ def cloud_button(label, key=None, color=None):
79
  position: relative;
80
  z-index: 1;
81
  }}
82
- .cloud:hover .rectangle {{
83
  background-color: #008CBA;
84
  color: white;
85
  }}
86
- .color-1 .rectangle, .color-1 .circle {{ background-color: #FFA07A; }}
87
- .color-2 .rectangle, .color-2 .circle {{ background-color: #FF7F50; }}
88
- .color-3 .rectangle, .color-3 .circle {{ background-color: #FF6347; }}
89
  </style>
90
  <script>
91
  document.getElementById("{button_id}").onclick = function() {{
@@ -97,6 +97,7 @@ def cloud_button(label, key=None, color=None):
97
 
98
 
99
 
 
100
  def load_pdf(file_path):
101
  pdf_reader = PdfReader(file_path)
102
  text = ""
 
25
 
26
 
27
 
28
+ import streamlit as st
29
+
30
  import streamlit as st
31
 
32
  def cloud_button(label, key=None, color=None):
 
49
  cloud_button_html = f"""
50
  <div class="cloud" id="{button_id}" style="margin-bottom: 20px;">
51
  {circles_html}
52
+ <span class="text {color_class}">{label}</span>
53
  </div>
54
  <style>
55
  .cloud {{
 
61
  font-size: 16px;
62
  white-space: nowrap;
63
  }}
64
+ .text {{
 
 
 
65
  position: relative;
66
  display: inline-flex;
67
  align-items: center;
 
70
  padding: 10px 20px;
71
  z-index: 2;
72
  transition: background-color 0.4s;
73
+ border-radius: 30px;
74
  }}
75
  .circle {{
76
  border-radius: 50%;
 
79
  position: relative;
80
  z-index: 1;
81
  }}
82
+ .cloud:hover .text {{
83
  background-color: #008CBA;
84
  color: white;
85
  }}
86
+ .color-1 .text, .color-1 .circle {{ background-color: #FFA07A; }}
87
+ .color-2 .text, .color-2 .circle {{ background-color: #FF7F50; }}
88
+ .color-3 .text, .color-3 .circle {{ background-color: #FF6347; }}
89
  </style>
90
  <script>
91
  document.getElementById("{button_id}").onclick = function() {{
 
97
 
98
 
99
 
100
+
101
  def load_pdf(file_path):
102
  pdf_reader = PdfReader(file_path)
103
  text = ""