Spaces:
Running
Running
Lohia, Aditya
commited on
Commit
·
2e70021
1
Parent(s):
334e8db
add: dialog to show server not responding
Browse files
dialog.py
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
|
4 |
+
def get_dialog_box():
|
5 |
+
return gr.HTML(
|
6 |
+
"""
|
7 |
+
<div style="display: flex; align-items: center; justify-content: center; min-height: 80vh;">
|
8 |
+
<div style="display: flex; flex-direction: column; align-items: center;">
|
9 |
+
<!-- Spinner -->
|
10 |
+
<div class="loader" style="margin-top: 20px;"></div>
|
11 |
+
<!-- Message -->
|
12 |
+
<h2 style="color: orange; font-family: trebuchet ms, sans-serif; align-items: center;">The service is not working, please refresh or try again later!</h2>
|
13 |
+
</div>
|
14 |
+
</div>
|
15 |
+
|
16 |
+
<!-- Spinner CSS -->
|
17 |
+
<style>
|
18 |
+
/* HTML: <div class="loader"></div> */
|
19 |
+
.loader {
|
20 |
+
width: 120px;
|
21 |
+
height: 22px;
|
22 |
+
border-radius: 40px;
|
23 |
+
color: orange !important;
|
24 |
+
border: 2px solid;
|
25 |
+
position: relative;
|
26 |
+
overflow: hidden;
|
27 |
+
}
|
28 |
+
.loader::before {
|
29 |
+
content: "";
|
30 |
+
position: absolute;
|
31 |
+
margin: 2px;
|
32 |
+
width: 14px;
|
33 |
+
top: 0;
|
34 |
+
bottom: 0;
|
35 |
+
left: -20px;
|
36 |
+
border-radius: inherit;
|
37 |
+
background: currentColor;
|
38 |
+
box-shadow: -10px 0 12px 3px currentColor;
|
39 |
+
clip-path: polygon(0 5%, 100% 0,100% 100%,0 95%,-30px 50%);
|
40 |
+
animation: l14 1s infinite linear;
|
41 |
+
}
|
42 |
+
@keyframes l14 {
|
43 |
+
100% {left: calc(100% + 20px)}
|
44 |
+
}
|
45 |
+
</style>
|
46 |
+
"""
|
47 |
+
)
|