Anne31415 commited on
Commit
902d85a
·
1 Parent(s): 27dbdfd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -13
app.py CHANGED
@@ -21,7 +21,7 @@ def cloud_button(label, key=None, color=None, overlap=30):
21
 
22
  # Create circles with text enclosed
23
  circles_html = ''.join([
24
- f'<div class="circle {color_class}"></div>'
25
  for _ in range(num_circles)
26
  ])
27
  circles_html += f'<div class="circle-text">{label}</div>' # Add the text after the circles
@@ -29,9 +29,7 @@ def cloud_button(label, key=None, color=None, overlap=30):
29
  cloud_button_html = f"""
30
  <div class="cloud" id="{button_id}" style="margin-bottom: 20px;">
31
  <div class="wrapper {color_class}">
32
- <div class="circle-container">
33
- {circles_html}
34
- </div>
35
  </div>
36
  </div>
37
  <style>
@@ -48,16 +46,12 @@ def cloud_button(label, key=None, color=None, overlap=30):
48
  position: relative;
49
  padding: 10px 20px;
50
  }}
51
- .circle-container {{
52
- position: relative;
53
- }}
54
  .circle {{
55
  background-color: #FF6347;
56
  border-radius: 50%;
57
  width: {circle_size}px;
58
  height: {circle_size}px;
59
  position: relative;
60
- margin-right: -{overlap}px; /* Adjust the margin for overlapping effect */
61
  }}
62
  .circle-text {{
63
  position: absolute;
@@ -70,9 +64,9 @@ def cloud_button(label, key=None, color=None, overlap=30):
70
  text-align: center; /* Center the text horizontally and vertically */
71
  }}
72
  /* Add this CSS for the hover effect and shadow */
73
- .cloud:hover .circle-container {{
74
- transform: scale(1.1); /* Scale up the circles on hover */
75
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Add a shadow on hover */
76
  }}
77
 
78
  .color-1 .circle {{ background-color: #FFA07A; }}
@@ -88,8 +82,6 @@ def cloud_button(label, key=None, color=None, overlap=30):
88
  st.markdown(cloud_button_html, unsafe_allow_html=True)
89
 
90
 
91
-
92
-
93
  # Step 1: Clone the Dataset Repository
94
  repo = Repository(
95
  local_dir="Private_Book", # Local directory to clone the repository
 
21
 
22
  # Create circles with text enclosed
23
  circles_html = ''.join([
24
+ f'<div class="circle {color_class}" style="margin-right: -{overlap}px;"></div>'
25
  for _ in range(num_circles)
26
  ])
27
  circles_html += f'<div class="circle-text">{label}</div>' # Add the text after the circles
 
29
  cloud_button_html = f"""
30
  <div class="cloud" id="{button_id}" style="margin-bottom: 20px;">
31
  <div class="wrapper {color_class}">
32
+ {circles_html}
 
 
33
  </div>
34
  </div>
35
  <style>
 
46
  position: relative;
47
  padding: 10px 20px;
48
  }}
 
 
 
49
  .circle {{
50
  background-color: #FF6347;
51
  border-radius: 50%;
52
  width: {circle_size}px;
53
  height: {circle_size}px;
54
  position: relative;
 
55
  }}
56
  .circle-text {{
57
  position: absolute;
 
64
  text-align: center; /* Center the text horizontally and vertically */
65
  }}
66
  /* Add this CSS for the hover effect and shadow */
67
+ .cloud:hover .circle {{
68
+ transform: scale(1.1); /* Scale up the circles on hover */
69
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Add a shadow on hover */
70
  }}
71
 
72
  .color-1 .circle {{ background-color: #FFA07A; }}
 
82
  st.markdown(cloud_button_html, unsafe_allow_html=True)
83
 
84
 
 
 
85
  # Step 1: Clone the Dataset Repository
86
  repo = Repository(
87
  local_dir="Private_Book", # Local directory to clone the repository