Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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
|
| 135 |
-
The progress bar
|
| 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: #
|
| 141 |
-
<div
|
| 142 |
</div>
|
| 143 |
</div>
|
| 144 |
<style>
|
| 145 |
-
@keyframes
|
| 146 |
-
0% {{
|
| 147 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
'''
|