Spaces:
Running
on
A10G
Running
on
A10G
Update app.py
Browse files
app.py
CHANGED
@@ -1093,15 +1093,55 @@ async () => {{
|
|
1093 |
var el = gradioEl.querySelector('.deadline-timer');
|
1094 |
var html = 'Preparing...';
|
1095 |
el.innerHTML = html;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1096 |
}};
|
1097 |
|
1098 |
var deadlineTextFinished = function () {{
|
1099 |
var el = gradioEl.querySelector('.deadline-timer');
|
1100 |
var html = 'Done! Retry?';
|
1101 |
el.innerHTML = html;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1102 |
}};
|
1103 |
|
1104 |
var deadlineText = function (remainingTime) {{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1105 |
var el = gradioEl.querySelector('.deadline-timer');
|
1106 |
var htmlBase = 'Remaining <span class="day">' + remainingTime + '</span> <span class="days">s</span>';
|
1107 |
// var html = '<div class="mask-red"><div class="inner">' + htmlBase + '</div></div><div class="mask-white"><div class="inner">' + htmlBase + '</div></div>';
|
@@ -1118,34 +1158,6 @@ async () => {{
|
|
1118 |
|
1119 |
function countTime() {{
|
1120 |
--actualDay;
|
1121 |
-
if (actualDay + 1 > deadline && actualDay <= deadline) {{
|
1122 |
-
gradioEl.querySelector('#progress-time-fill').style['animation-duration'] = animationTime + 's';
|
1123 |
-
gradioEl.querySelector('#progress-time-fill').style['-webkit-animation-name'] = 'progress-fill';
|
1124 |
-
gradioEl.querySelector('#progress-time-fill').style['animation-name'] = 'progress-fill';
|
1125 |
-
gradioEl.querySelector('#death-group').style['animation-duration'] = animationTime + 's';
|
1126 |
-
gradioEl.querySelector('#death-group').style['-webkit-animation-name'] = 'walk';
|
1127 |
-
gradioEl.querySelector('#death-group').style['animation-name'] = 'show-flames';
|
1128 |
-
gradioEl.querySelector('#red-flame').style['-webkit-animation-name'] = 'show-flames';
|
1129 |
-
gradioEl.querySelector('#red-flame').style['animation-name'] = 'show-flames';
|
1130 |
-
gradioEl.querySelector('#yellow-flame').style['-webkit-animation-name'] = 'show-flames';
|
1131 |
-
gradioEl.querySelector('#yellow-flame').style['animation-name'] = 'show-flames';
|
1132 |
-
gradioEl.querySelector('#white-flame').style['-webkit-animation-name'] = 'show-flames';
|
1133 |
-
gradioEl.querySelector('#white-flame').style['animation-name'] = 'show-flames';
|
1134 |
-
}}
|
1135 |
-
if (actualDay + 1 > 0 && actualDay <= 0) {{
|
1136 |
-
gradioEl.querySelector('#progress-time-fill').style['animation-duration'] = 1000000 + 's';
|
1137 |
-
gradioEl.querySelector('#progress-time-fill').style['-webkit-animation-name'] = 'finished-fill';
|
1138 |
-
gradioEl.querySelector('#progress-time-fill').style['animation-name'] = 'finished-fill';
|
1139 |
-
gradioEl.querySelector('#death-group').style['animation-duration'] = 1000000 + 's';
|
1140 |
-
gradioEl.querySelector('#death-group').style['-webkit-animation-name'] = 'finished';
|
1141 |
-
gradioEl.querySelector('#death-group').style['animation-name'] = 'finished';
|
1142 |
-
gradioEl.querySelector('#red-flame').style['-webkit-animation-name'] = 'finished-flames';
|
1143 |
-
gradioEl.querySelector('#red-flame').style['animation-name'] = 'finished-flames';
|
1144 |
-
gradioEl.querySelector('#yellow-flame').style['-webkit-animation-name'] = 'finished-flames';
|
1145 |
-
gradioEl.querySelector('#yellow-flame').style['animation-name'] = 'finished-flames';
|
1146 |
-
gradioEl.querySelector('#white-flame').style['-webkit-animation-name'] = 'finished-flames';
|
1147 |
-
gradioEl.querySelector('#white-flame').style['animation-name'] = 'finished-flames';
|
1148 |
-
}}
|
1149 |
if (actualDay > deadline) {{
|
1150 |
deadlineTextBegin();
|
1151 |
}} else if (actualDay > 0) {{
|
@@ -1170,18 +1182,6 @@ async () => {{
|
|
1170 |
if (imgSrc == imgSrcNew) {{
|
1171 |
// Do nothing.
|
1172 |
deadlineTextBegin();
|
1173 |
-
gradioEl.querySelector('#progress-time-fill').style['animation-duration'] = 1000000 + 's';
|
1174 |
-
gradioEl.querySelector('#progress-time-fill').style['-webkit-animation-name'] = 'idle-fill';
|
1175 |
-
gradioEl.querySelector('#progress-time-fill').style['animation-name'] = 'idle-fill';
|
1176 |
-
gradioEl.querySelector('#death-group').style['animation-duration'] = 1000000 + 's';
|
1177 |
-
gradioEl.querySelector('#death-group').style['-webkit-animation-name'] = 'idle';
|
1178 |
-
gradioEl.querySelector('#death-group').style['animation-name'] = 'idle';
|
1179 |
-
gradioEl.querySelector('#red-flame').style['-webkit-animation-name'] = 'idle-flames';
|
1180 |
-
gradioEl.querySelector('#red-flame').style['animation-name'] = 'idle-flames';
|
1181 |
-
gradioEl.querySelector('#yellow-flame').style['-webkit-animation-name'] = 'idle-flames';
|
1182 |
-
gradioEl.querySelector('#yellow-flame').style['animation-name'] = 'idle-flames';
|
1183 |
-
gradioEl.querySelector('#white-flame').style['-webkit-animation-name'] = 'idle-flames';
|
1184 |
-
gradioEl.querySelector('#white-flame').style['animation-name'] = 'idle-flames';
|
1185 |
}} else {{
|
1186 |
// Running = True
|
1187 |
state = true;
|
|
|
1093 |
var el = gradioEl.querySelector('.deadline-timer');
|
1094 |
var html = 'Preparing...';
|
1095 |
el.innerHTML = html;
|
1096 |
+
|
1097 |
+
gradioEl.querySelector('#progress-time-fill').style['animation-duration'] = 1000000 + 's';
|
1098 |
+
gradioEl.querySelector('#progress-time-fill').style['-webkit-animation-name'] = 'idle-fill';
|
1099 |
+
gradioEl.querySelector('#progress-time-fill').style['animation-name'] = 'idle-fill';
|
1100 |
+
gradioEl.querySelector('#death-group').style['animation-duration'] = 1000000 + 's';
|
1101 |
+
gradioEl.querySelector('#death-group').style['-webkit-animation-name'] = 'idle';
|
1102 |
+
gradioEl.querySelector('#death-group').style['animation-name'] = 'idle';
|
1103 |
+
gradioEl.querySelector('#red-flame').style['-webkit-animation-name'] = 'idle-flames';
|
1104 |
+
gradioEl.querySelector('#red-flame').style['animation-name'] = 'idle-flames';
|
1105 |
+
gradioEl.querySelector('#yellow-flame').style['-webkit-animation-name'] = 'idle-flames';
|
1106 |
+
gradioEl.querySelector('#yellow-flame').style['animation-name'] = 'idle-flames';
|
1107 |
+
gradioEl.querySelector('#white-flame').style['-webkit-animation-name'] = 'idle-flames';
|
1108 |
+
gradioEl.querySelector('#white-flame').style['animation-name'] = 'idle-flames';
|
1109 |
}};
|
1110 |
|
1111 |
var deadlineTextFinished = function () {{
|
1112 |
var el = gradioEl.querySelector('.deadline-timer');
|
1113 |
var html = 'Done! Retry?';
|
1114 |
el.innerHTML = html;
|
1115 |
+
|
1116 |
+
gradioEl.querySelector('#progress-time-fill').style['animation-duration'] = 1000000 + 's';
|
1117 |
+
gradioEl.querySelector('#progress-time-fill').style['-webkit-animation-name'] = 'finished-fill';
|
1118 |
+
gradioEl.querySelector('#progress-time-fill').style['animation-name'] = 'finished-fill';
|
1119 |
+
gradioEl.querySelector('#death-group').style['animation-duration'] = 1000000 + 's';
|
1120 |
+
gradioEl.querySelector('#death-group').style['-webkit-animation-name'] = 'finished';
|
1121 |
+
gradioEl.querySelector('#death-group').style['animation-name'] = 'finished';
|
1122 |
+
gradioEl.querySelector('#red-flame').style['-webkit-animation-name'] = 'finished-flames';
|
1123 |
+
gradioEl.querySelector('#red-flame').style['animation-name'] = 'finished-flames';
|
1124 |
+
gradioEl.querySelector('#yellow-flame').style['-webkit-animation-name'] = 'finished-flames';
|
1125 |
+
gradioEl.querySelector('#yellow-flame').style['animation-name'] = 'finished-flames';
|
1126 |
+
gradioEl.querySelector('#white-flame').style['-webkit-animation-name'] = 'finished-flames';
|
1127 |
+
gradioEl.querySelector('#white-flame').style['animation-name'] = 'finished-flames';
|
1128 |
}};
|
1129 |
|
1130 |
var deadlineText = function (remainingTime) {{
|
1131 |
+
if (remainingTime == days) {{
|
1132 |
+
gradioEl.querySelector('#progress-time-fill').style['animation-duration'] = animationTime + 's';
|
1133 |
+
gradioEl.querySelector('#progress-time-fill').style['-webkit-animation-name'] = 'progress-fill';
|
1134 |
+
gradioEl.querySelector('#progress-time-fill').style['animation-name'] = 'progress-fill';
|
1135 |
+
gradioEl.querySelector('#death-group').style['animation-duration'] = animationTime + 's';
|
1136 |
+
gradioEl.querySelector('#death-group').style['-webkit-animation-name'] = 'walk';
|
1137 |
+
gradioEl.querySelector('#death-group').style['animation-name'] = 'show-flames';
|
1138 |
+
gradioEl.querySelector('#red-flame').style['-webkit-animation-name'] = 'show-flames';
|
1139 |
+
gradioEl.querySelector('#red-flame').style['animation-name'] = 'show-flames';
|
1140 |
+
gradioEl.querySelector('#yellow-flame').style['-webkit-animation-name'] = 'show-flames';
|
1141 |
+
gradioEl.querySelector('#yellow-flame').style['animation-name'] = 'show-flames';
|
1142 |
+
gradioEl.querySelector('#white-flame').style['-webkit-animation-name'] = 'show-flames';
|
1143 |
+
gradioEl.querySelector('#white-flame').style['animation-name'] = 'show-flames';
|
1144 |
+
}}
|
1145 |
var el = gradioEl.querySelector('.deadline-timer');
|
1146 |
var htmlBase = 'Remaining <span class="day">' + remainingTime + '</span> <span class="days">s</span>';
|
1147 |
// var html = '<div class="mask-red"><div class="inner">' + htmlBase + '</div></div><div class="mask-white"><div class="inner">' + htmlBase + '</div></div>';
|
|
|
1158 |
|
1159 |
function countTime() {{
|
1160 |
--actualDay;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1161 |
if (actualDay > deadline) {{
|
1162 |
deadlineTextBegin();
|
1163 |
}} else if (actualDay > 0) {{
|
|
|
1182 |
if (imgSrc == imgSrcNew) {{
|
1183 |
// Do nothing.
|
1184 |
deadlineTextBegin();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1185 |
}} else {{
|
1186 |
// Running = True
|
1187 |
state = true;
|