xp3857 commited on
Commit
51acf99
1 Parent(s): 1169dde

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +67 -1
app.py CHANGED
@@ -39,7 +39,73 @@ m_out = ("""
39
  <h4 id="cont">Please choose a Simpler Prompt, or <b>Upgrade</b> for faster loading.</h4>
40
  </div>
41
  """)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
 
 
 
 
 
 
 
 
 
 
 
 
43
  def ac():
44
  def clear():
45
  return gr.update(value=0),gr.update(value=0)
@@ -66,7 +132,7 @@ def ac():
66
  except Exception:
67
  return None, None
68
  def cl_fac():
69
- return "",gr.HTML.update("")
70
  with gr.Blocks(css=css) as b:
71
  with gr.Row():
72
  with gr.Column():
 
39
  <h4 id="cont">Please choose a Simpler Prompt, or <b>Upgrade</b> for faster loading.</h4>
40
  </div>
41
  """)
42
+ loading=("""
43
+ <style>
44
+ .lds-ellipsis {
45
+ display: inline-block;
46
+ position: relative;
47
+ width: 80px;
48
+ height: 80px;
49
+ }
50
+ .lds-ellipsis div {
51
+ position: absolute;
52
+ top: 33px;
53
+ width: 13px;
54
+ height: 13px;
55
+ border-radius: 50%;
56
+ background: #fff;
57
+ animation-timing-function: cubic-bezier(0, 1, 1, 0);
58
+ }
59
+ .lds-ellipsis div:nth-child(1) {
60
+ left: 8px;
61
+ animation: lds-ellipsis1 0.6s infinite;
62
+ }
63
+ .lds-ellipsis div:nth-child(2) {
64
+ left: 8px;
65
+ animation: lds-ellipsis2 0.6s infinite;
66
+ }
67
+ .lds-ellipsis div:nth-child(3) {
68
+ left: 32px;
69
+ animation: lds-ellipsis2 0.6s infinite;
70
+ }
71
+ .lds-ellipsis div:nth-child(4) {
72
+ left: 56px;
73
+ animation: lds-ellipsis3 0.6s infinite;
74
+ }
75
+ @keyframes lds-ellipsis1 {
76
+ 0% {
77
+ transform: scale(0);
78
+ }
79
+ 100% {
80
+ transform: scale(1);
81
+ }
82
+ }
83
+ @keyframes lds-ellipsis3 {
84
+ 0% {
85
+ transform: scale(1);
86
+ }
87
+ 100% {
88
+ transform: scale(0);
89
+ }frames lds-ellipsis2 {
90
+ 0% {
91
+ transform: translate(0, 0);
92
+ }
93
+ 100% {
94
+ transform: translate(24px, 0);
95
+ }
96
+ }
97
 
98
+ }
99
+ @keyframes lds-ellipsis2 {
100
+ 0% {
101
+ transform: translate(0, 0);
102
+ }
103
+ 100% {
104
+ transform: translate(24px, 0);
105
+ }
106
+ }
107
+ </style>
108
+ <div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>""")
109
  def ac():
110
  def clear():
111
  return gr.update(value=0),gr.update(value=0)
 
132
  except Exception:
133
  return None, None
134
  def cl_fac():
135
+ return "",gr.HTML.update(f"{loading}")
136
  with gr.Blocks(css=css) as b:
137
  with gr.Row():
138
  with gr.Column():