prithivMLmods commited on
Commit
fdd6dc1
·
verified ·
1 Parent(s): 58ad487

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -7
app.py CHANGED
@@ -131,20 +131,35 @@ def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
131
 
132
  def progress_bar_html(label: str) -> str:
133
  """
134
- Returns an HTML snippet for a thin progress bar with a label.
135
- The progress bar now has a water flowing effect using a blue gradient.
136
  """
137
  return f'''
138
  <div style="display: flex; align-items: center;">
139
  <span style="margin-right: 10px; font-size: 14px;">{label}</span>
140
- <div style="width: 110px; height: 5px; background-color: #e0f7fa; border-radius: 2px; overflow: hidden;">
141
- <div style="width: 100%; height: 100%; background: linear-gradient(270deg, #00bfff, #1e90ff, #00bfff); background-size: 200% 200%; animation: flow 1.5s linear infinite;"></div>
142
  </div>
143
  </div>
144
  <style>
145
- @keyframes flow {{
146
- 0% {{ background-position: 0% 50%; }}
147
- 100% {{ background-position: 100% 50%; }}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  }}
149
  </style>
150
  '''
 
131
 
132
  def progress_bar_html(label: str) -> str:
133
  """
134
+ Returns an HTML snippet for a thin progress bar with a thunder strike animation.
135
+ The progress bar simulates a lightning bolt streaking across a dark background.
136
  """
137
  return f'''
138
  <div style="display: flex; align-items: center;">
139
  <span style="margin-right: 10px; font-size: 14px;">{label}</span>
140
+ <div style="width: 110px; height: 5px; background-color: #222; border-radius: 2px; position: relative; overflow: hidden;">
141
+ <div class="lightning"></div>
142
  </div>
143
  </div>
144
  <style>
145
+ @keyframes strike {{
146
+ 0% {{ left: -15px; opacity: 0; }}
147
+ 10% {{ left: 0; opacity: 1; }}
148
+ 20% {{ left: 25px; opacity: 0; }}
149
+ 30% {{ left: 50px; opacity: 1; }}
150
+ 40% {{ left: 75px; opacity: 0; }}
151
+ 50% {{ left: 90px; opacity: 1; }}
152
+ 60% {{ left: 110px; opacity: 0; }}
153
+ 100% {{ left: 110px; opacity: 0; }}
154
+ }}
155
+
156
+ .lightning {{
157
+ position: absolute;
158
+ width: 15px;
159
+ height: 5px;
160
+ background-color: #fff;
161
+ clip-path: polygon(50% 0%, 60% 30%, 50% 30%, 60% 60%, 40% 60%, 50% 100%, 30% 70%, 40% 50%, 30% 50%, 40% 30%);
162
+ animation: strike 2s infinite;
163
  }}
164
  </style>
165
  '''