Spaces:
Running
Running
Added spinner for waiting on bokeh graph
Browse files- analyze_winscore.py +21 -0
analyze_winscore.py
CHANGED
|
@@ -30,10 +30,31 @@ def bokeh2fullhtml(obj):
|
|
| 30 |
<html lang="en">
|
| 31 |
<head>
|
| 32 |
{CDN.render()}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
</head>
|
| 34 |
<body>
|
|
|
|
| 35 |
{div}
|
| 36 |
{script}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
</body>
|
| 38 |
</html>"""
|
| 39 |
|
|
|
|
| 30 |
<html lang="en">
|
| 31 |
<head>
|
| 32 |
{CDN.render()}
|
| 33 |
+
<style>
|
| 34 |
+
.spinner {{
|
| 35 |
+
padding-top: 50px;
|
| 36 |
+
padding-left: 50px;
|
| 37 |
+
position: absolute;
|
| 38 |
+
}}
|
| 39 |
+
.spinner::after {{
|
| 40 |
+
content: "β Loading...";
|
| 41 |
+
font-size: 20px;
|
| 42 |
+
animation: blink 1s infinite;
|
| 43 |
+
}}
|
| 44 |
+
@keyframes blink {{
|
| 45 |
+
0%,100% {{opacity:1;}} 50% {{opacity:0.3;}}
|
| 46 |
+
}}
|
| 47 |
+
</style>
|
| 48 |
</head>
|
| 49 |
<body>
|
| 50 |
+
<div id="spinner" class="spinner"></div>
|
| 51 |
{div}
|
| 52 |
{script}
|
| 53 |
+
<script>
|
| 54 |
+
window.addEventListener('load', () => {{
|
| 55 |
+
document.getElementById('spinner').style.display = 'none';
|
| 56 |
+
}});
|
| 57 |
+
</script>
|
| 58 |
</body>
|
| 59 |
</html>"""
|
| 60 |
|