Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -29,10 +29,12 @@ def cloud_button(label, key=None, color=None):
|
|
29 |
color_class = f"color-{color}" if color else ""
|
30 |
num_circles = max(3, min(12, len(label) // 4))
|
31 |
circle_size = 60
|
|
|
32 |
|
33 |
-
# Create circles with text enclosed
|
34 |
circles_html = ''.join([
|
35 |
-
f'<div class="circle {color_class}"></div>'
|
|
|
36 |
])
|
37 |
circles_html += f'<div class="circle-text">{label}</div>' # Add the text after the circles
|
38 |
|
@@ -61,7 +63,7 @@ def cloud_button(label, key=None, color=None):
|
|
61 |
border-radius: 50%;
|
62 |
width: {circle_size}px;
|
63 |
height: {circle_size}px;
|
64 |
-
position:
|
65 |
}}
|
66 |
.circle-text {{
|
67 |
position: absolute;
|
@@ -89,7 +91,6 @@ cloud_button("This is a longer piece of text", color="2")
|
|
89 |
cloud_button("This is an even longer piece of text to test the cloud button", color="3")
|
90 |
|
91 |
|
92 |
-
|
93 |
def load_pdf(file_path):
|
94 |
pdf_reader = PdfReader(file_path)
|
95 |
text = ""
|
|
|
29 |
color_class = f"color-{color}" if color else ""
|
30 |
num_circles = max(3, min(12, len(label) // 4))
|
31 |
circle_size = 60
|
32 |
+
overlap = 20 # Adjust the overlap value as needed
|
33 |
|
34 |
+
# Create circles with text enclosed and overlap them
|
35 |
circles_html = ''.join([
|
36 |
+
f'<div class="circle {color_class}" style="left: {i * overlap}px; top: {i * overlap}px;"></div>'
|
37 |
+
for i in range(num_circles)
|
38 |
])
|
39 |
circles_html += f'<div class="circle-text">{label}</div>' # Add the text after the circles
|
40 |
|
|
|
63 |
border-radius: 50%;
|
64 |
width: {circle_size}px;
|
65 |
height: {circle_size}px;
|
66 |
+
position: absolute;
|
67 |
}}
|
68 |
.circle-text {{
|
69 |
position: absolute;
|
|
|
91 |
cloud_button("This is an even longer piece of text to test the cloud button", color="3")
|
92 |
|
93 |
|
|
|
94 |
def load_pdf(file_path):
|
95 |
pdf_reader = PdfReader(file_path)
|
96 |
text = ""
|