Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -23,14 +23,20 @@ repo.git_pull() # Pull the latest changes (if any)
|
|
23 |
# Step 2: Load the PDF File
|
24 |
pdf_file_path = "Private_Book/KOMBI_all2.pdf" # Replace with your PDF file path
|
25 |
|
|
|
|
|
|
|
|
|
26 |
def cloud_button(label, key=None, color=None):
|
27 |
button_id = f"cloud-button-{key or label}"
|
28 |
color_class = f"color-{color}" if color else ""
|
29 |
num_circles = max(3, min(12, len(label) // 4))
|
30 |
circle_size = 60
|
31 |
|
|
|
32 |
circles_html = ''.join([
|
33 |
-
f'<div class="circle {color_class}"
|
|
|
34 |
])
|
35 |
|
36 |
cloud_button_html = f"""
|
@@ -86,6 +92,7 @@ cloud_button("This is an even longer piece of text to test the cloud button", co
|
|
86 |
|
87 |
|
88 |
|
|
|
89 |
def load_pdf(file_path):
|
90 |
pdf_reader = PdfReader(file_path)
|
91 |
text = ""
|
|
|
23 |
# Step 2: Load the PDF File
|
24 |
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):
|
31 |
button_id = f"cloud-button-{key or label}"
|
32 |
color_class = f"color-{color}" if color else ""
|
33 |
num_circles = max(3, min(12, len(label) // 4))
|
34 |
circle_size = 60
|
35 |
|
36 |
+
# Generate circles with different positions
|
37 |
circles_html = ''.join([
|
38 |
+
f'<div class="circle {color_class}" style="margin-left: {-circle_size//3 * (i % 3)}px; margin-top: {-circle_size//3 * (i // 3)}px;"></div>'
|
39 |
+
for i in range(num_circles)
|
40 |
])
|
41 |
|
42 |
cloud_button_html = f"""
|
|
|
92 |
|
93 |
|
94 |
|
95 |
+
|
96 |
def load_pdf(file_path):
|
97 |
pdf_reader = PdfReader(file_path)
|
98 |
text = ""
|