Anne31415 commited on
Commit
c3625a6
·
1 Parent(s): 494b92f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -26,7 +26,7 @@ pdf_file_path = "Private_Book/KOMBI_all2.pdf" # Replace with your PDF file path
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(len(label) // 252, 3) # Ensure at least 3 circles for shorter text
30
 
31
  # Calculate spacing based on the number of circles
32
  spacing = 20 // num_circles
 
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 = min(max(len(label) // 25, 3), 12)
30
 
31
  # Calculate spacing based on the number of circles
32
  spacing = 20 // num_circles