Update app.py
Browse fileslogo animation debugging JS issues right now
app.py
CHANGED
|
@@ -73,8 +73,8 @@ with gr.Blocks(title="DeepV for RTL (Model-Agnostic)", theme=gr.themes.Soft()) a
|
|
| 73 |
with gr.Column(scale=3):
|
| 74 |
# --- DeepV Logo with CSS Background Image and animation ---
|
| 75 |
with gr.Row(elem_id="logo-and-output-row"):
|
| 76 |
-
|
| 77 |
-
|
| 78 |
<div id="animated-deepv-logo">
|
| 79 |
<span class="deepv-char" id="deepv-D">D</span>
|
| 80 |
<span class="deepv-char" id="deepv-E1">E</span>
|
|
@@ -82,7 +82,8 @@ with gr.Blocks(title="DeepV for RTL (Model-Agnostic)", theme=gr.themes.Soft()) a
|
|
| 82 |
<span class="deepv-char" id="deepv-P">P</span>
|
| 83 |
<span class="deepv-char" id="deepv-V">V</span>
|
| 84 |
</div>
|
| 85 |
-
|
|
|
|
| 86 |
gr.Markdown("**Output**", elem_id="output-title")
|
| 87 |
|
| 88 |
with gr.Group():
|
|
@@ -172,44 +173,44 @@ with gr.Blocks(title="DeepV for RTL (Model-Agnostic)", theme=gr.themes.Soft()) a
|
|
| 172 |
/* Logo and Output Row Layout */
|
| 173 |
#logo-and-output-row {
|
| 174 |
display: flex;
|
| 175 |
-
align-items: center;
|
| 176 |
-
justify-content: center;
|
| 177 |
-
margin-bottom: 10px;
|
| 178 |
-
height: 80px;
|
| 179 |
-
position: relative;
|
| 180 |
}
|
| 181 |
|
| 182 |
/* Styling for the animated logo container */
|
| 183 |
#animated-deepv-logo {
|
| 184 |
position: relative;
|
| 185 |
-
width: 150px;
|
| 186 |
-
height: 70px;
|
| 187 |
-
display: flex;
|
| 188 |
justify-content: center;
|
| 189 |
align-items: center;
|
| 190 |
font-family: 'Poppins', sans-serif;
|
| 191 |
font-weight: 800;
|
| 192 |
-
font-size: 4em;
|
| 193 |
line-height: 1;
|
| 194 |
-
overflow: hidden;
|
| 195 |
-
padding-right: 15px;
|
| 196 |
}
|
| 197 |
|
| 198 |
.deepv-char {
|
| 199 |
-
position: absolute;
|
| 200 |
opacity: 0;
|
| 201 |
-
transition: all 0.3s ease-out;
|
| 202 |
white-space: nowrap;
|
| 203 |
}
|
| 204 |
|
| 205 |
#deepv-V {
|
| 206 |
color: var(--v-orange);
|
| 207 |
-
font-size: 1.5em;
|
| 208 |
-
opacity: 1;
|
| 209 |
top: 50%;
|
| 210 |
left: 50%;
|
| 211 |
-
transform: translate(-50%, -50%);
|
| 212 |
-
z-index: 1;
|
| 213 |
}
|
| 214 |
|
| 215 |
/* Positioning for DEEP letters relative to V */
|
|
@@ -228,20 +229,18 @@ with gr.Blocks(title="DeepV for RTL (Model-Agnostic)", theme=gr.themes.Soft()) a
|
|
| 228 |
@keyframes charHopAway {
|
| 229 |
0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
|
| 230 |
50% { opacity: 1; transform: translate(-50%, -100%) scale(1.1); }
|
| 231 |
-
100% { opacity: 0; transform: translate(-50%, -200%) scale(0.5); }
|
| 232 |
}
|
| 233 |
|
| 234 |
|
| 235 |
-
/* Output Title Styling */
|
| 236 |
#output-title {
|
| 237 |
-
margin: 0;
|
| 238 |
font-size: 1.2em;
|
| 239 |
font-weight: bold;
|
| 240 |
-
margin-left: 20px;
|
| 241 |
-
animation: fadeInScale 1.5s ease-out forwards;
|
| 242 |
}
|
| 243 |
|
| 244 |
-
/* General UI element styling */
|
| 245 |
#verilog-output > label > .label-wrap {
|
| 246 |
position: relative;
|
| 247 |
}
|
|
@@ -276,13 +275,13 @@ with gr.Blocks(title="DeepV for RTL (Model-Agnostic)", theme=gr.themes.Soft()) a
|
|
| 276 |
100% { background-color: #e6f2ff; }
|
| 277 |
}
|
| 278 |
"""
|
| 279 |
-
|
| 280 |
-
# --- JavaScript
|
| 281 |
demo.load(
|
| 282 |
-
None,
|
| 283 |
-
None,
|
| 284 |
-
None,
|
| 285 |
-
|
| 286 |
() => {
|
| 287 |
const chars = ['deepv-D', 'deepv-E1', 'deepv-E2', 'deepv-P'];
|
| 288 |
const V_char = document.getElementById('deepv-V');
|
|
|
|
| 73 |
with gr.Column(scale=3):
|
| 74 |
# --- DeepV Logo with CSS Background Image and animation ---
|
| 75 |
with gr.Row(elem_id="logo-and-output-row"):
|
| 76 |
+
gr.Markdown(
|
| 77 |
+
"""
|
| 78 |
<div id="animated-deepv-logo">
|
| 79 |
<span class="deepv-char" id="deepv-D">D</span>
|
| 80 |
<span class="deepv-char" id="deepv-E1">E</span>
|
|
|
|
| 82 |
<span class="deepv-char" id="deepv-P">P</span>
|
| 83 |
<span class="deepv-char" id="deepv-V">V</span>
|
| 84 |
</div>
|
| 85 |
+
"""
|
| 86 |
+
)
|
| 87 |
gr.Markdown("**Output**", elem_id="output-title")
|
| 88 |
|
| 89 |
with gr.Group():
|
|
|
|
| 173 |
/* Logo and Output Row Layout */
|
| 174 |
#logo-and-output-row {
|
| 175 |
display: flex;
|
| 176 |
+
align-items: center;
|
| 177 |
+
justify-content: center;
|
| 178 |
+
margin-bottom: 10px;
|
| 179 |
+
height: 80px;
|
| 180 |
+
position: relative;
|
| 181 |
}
|
| 182 |
|
| 183 |
/* Styling for the animated logo container */
|
| 184 |
#animated-deepv-logo {
|
| 185 |
position: relative;
|
| 186 |
+
width: 150px;
|
| 187 |
+
height: 70px;
|
| 188 |
+
display: flex;
|
| 189 |
justify-content: center;
|
| 190 |
align-items: center;
|
| 191 |
font-family: 'Poppins', sans-serif;
|
| 192 |
font-weight: 800;
|
| 193 |
+
font-size: 4em;
|
| 194 |
line-height: 1;
|
| 195 |
+
overflow: hidden;
|
| 196 |
+
padding-right: 15px;
|
| 197 |
}
|
| 198 |
|
| 199 |
.deepv-char {
|
| 200 |
+
position: absolute;
|
| 201 |
opacity: 0;
|
| 202 |
+
transition: all 0.3s ease-out;
|
| 203 |
white-space: nowrap;
|
| 204 |
}
|
| 205 |
|
| 206 |
#deepv-V {
|
| 207 |
color: var(--v-orange);
|
| 208 |
+
font-size: 1.5em;
|
| 209 |
+
opacity: 1;
|
| 210 |
top: 50%;
|
| 211 |
left: 50%;
|
| 212 |
+
transform: translate(-50%, -50%);
|
| 213 |
+
z-index: 1;
|
| 214 |
}
|
| 215 |
|
| 216 |
/* Positioning for DEEP letters relative to V */
|
|
|
|
| 229 |
@keyframes charHopAway {
|
| 230 |
0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
|
| 231 |
50% { opacity: 1; transform: translate(-50%, -100%) scale(1.1); }
|
| 232 |
+
100% { opacity: 0; transform: translate(-50%, -200%) scale(0.5); }
|
| 233 |
}
|
| 234 |
|
| 235 |
|
|
|
|
| 236 |
#output-title {
|
| 237 |
+
margin: 0;
|
| 238 |
font-size: 1.2em;
|
| 239 |
font-weight: bold;
|
| 240 |
+
margin-left: 20px;
|
| 241 |
+
animation: fadeInScale 1.5s ease-out forwards;
|
| 242 |
}
|
| 243 |
|
|
|
|
| 244 |
#verilog-output > label > .label-wrap {
|
| 245 |
position: relative;
|
| 246 |
}
|
|
|
|
| 275 |
100% { background-color: #e6f2ff; }
|
| 276 |
}
|
| 277 |
"""
|
| 278 |
+
|
| 279 |
+
# --- JavaScript to run on page load ---
|
| 280 |
demo.load(
|
| 281 |
+
fn=None,
|
| 282 |
+
inputs=None,
|
| 283 |
+
outputs=None,
|
| 284 |
+
js="""
|
| 285 |
() => {
|
| 286 |
const chars = ['deepv-D', 'deepv-E1', 'deepv-E2', 'deepv-P'];
|
| 287 |
const V_char = document.getElementById('deepv-V');
|