Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -274,8 +274,8 @@ with gr.Blocks(
|
|
| 274 |
|
| 275 |
|
| 276 |
input, textarea, select {
|
| 277 |
-
border-radius: 8px
|
| 278 |
-
border: 1px solid #ccc
|
| 279 |
padding: 10px !important;
|
| 280 |
background-color: #fff5fc;
|
| 281 |
box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
|
|
@@ -346,15 +346,25 @@ with gr.Blocks(
|
|
| 346 |
font-weight: 600;
|
| 347 |
font-size: 1.2rem;
|
| 348 |
}
|
| 349 |
-
#output{
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 356 |
}
|
| 357 |
|
|
|
|
| 358 |
|
| 359 |
@keyframes float {
|
| 360 |
0% { transform: translateY(0px); }
|
|
@@ -378,6 +388,33 @@ with gr.Blocks(
|
|
| 378 |
0% { background-position: 0% 50%; }
|
| 379 |
100% { background-position: 100% 50%; }
|
| 380 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 381 |
|
| 382 |
""") as demo:
|
| 383 |
gr.Markdown('<h1 class="animated-title">π¬ Comic Generator</h1>')
|
|
@@ -416,13 +453,13 @@ with gr.Blocks(
|
|
| 416 |
summary_output = gr.Markdown(label="π Scene Summary", elem_id = "output")
|
| 417 |
explanation_output = gr.Textbox(label="π Scene Explanation", lines=6,elem_id="output")
|
| 418 |
|
| 419 |
-
with gr.Row():
|
| 420 |
tts_btn = gr.Button("π Read Aloud", elem_id="tts-btn")
|
| 421 |
tts_audio = gr.Audio(label="Audio", autoplay=False)
|
| 422 |
|
| 423 |
done_btn = gr.Button("β
Done", visible=False, elem_id="done-btn")
|
| 424 |
-
txt_file = gr.File(label="π Explanations (.txt)")
|
| 425 |
-
pdf_file = gr.File(label="π Scene PDF")
|
| 426 |
|
| 427 |
# States
|
| 428 |
scene_images = gr.State([])
|
|
|
|
| 274 |
|
| 275 |
|
| 276 |
input, textarea, select {
|
| 277 |
+
border-radius: 8px ;
|
| 278 |
+
border: 1px solid #ccc;
|
| 279 |
padding: 10px !important;
|
| 280 |
background-color: #fff5fc;
|
| 281 |
box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
|
|
|
|
| 346 |
font-weight: 600;
|
| 347 |
font-size: 1.2rem;
|
| 348 |
}
|
| 349 |
+
#output {
|
| 350 |
+
background: #fff0f5;
|
| 351 |
+
border: 2px dashed #d63384;
|
| 352 |
+
border-radius: 14px;
|
| 353 |
+
padding: 16px;
|
| 354 |
+
font-size: 1.1rem;
|
| 355 |
+
color: #4a235a;
|
| 356 |
+
animation: floatX 4s ease-in-out infinite;
|
| 357 |
+
box-shadow: 0 4px 8px rgba(214, 51, 132, 0.15);
|
| 358 |
+
transition: all 0.3s ease-in-out;
|
| 359 |
+
}
|
| 360 |
+
|
| 361 |
+
#output:hover {
|
| 362 |
+
background: #ffe0ec;
|
| 363 |
+
transform: scale(1.01);
|
| 364 |
+
cursor: default;
|
| 365 |
}
|
| 366 |
|
| 367 |
+
|
| 368 |
|
| 369 |
@keyframes float {
|
| 370 |
0% { transform: translateY(0px); }
|
|
|
|
| 388 |
0% { background-position: 0% 50%; }
|
| 389 |
100% { background-position: 100% 50%; }
|
| 390 |
}
|
| 391 |
+
@keyframes bounce {
|
| 392 |
+
0% { transform: scale(1); }
|
| 393 |
+
50% { transform: scale(1.1); }
|
| 394 |
+
100% { transform: scale(1); }
|
| 395 |
+
}
|
| 396 |
+
|
| 397 |
+
.gr-file label[for^=component-]:before {
|
| 398 |
+
content: "π";
|
| 399 |
+
margin-right: 8px;
|
| 400 |
+
font-size: 1.2rem;
|
| 401 |
+
animation: bounce 2s infinite;
|
| 402 |
+
}
|
| 403 |
+
.gr-audio {
|
| 404 |
+
border: 2px solid #ab47bc;
|
| 405 |
+
background-color: #f3e5f5;
|
| 406 |
+
border-radius: 16px;
|
| 407 |
+
padding: 12px;
|
| 408 |
+
animation: pulseColor 3s infinite;
|
| 409 |
+
transition: transform 0.3s ease;
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
.gr-audio:hover {
|
| 413 |
+
transform: scale(1.02);
|
| 414 |
+
box-shadow: 0 6px 12px rgba(171, 71, 188, 0.2);
|
| 415 |
+
}
|
| 416 |
+
|
| 417 |
+
|
| 418 |
|
| 419 |
""") as demo:
|
| 420 |
gr.Markdown('<h1 class="animated-title">π¬ Comic Generator</h1>')
|
|
|
|
| 453 |
summary_output = gr.Markdown(label="π Scene Summary", elem_id = "output")
|
| 454 |
explanation_output = gr.Textbox(label="π Scene Explanation", lines=6,elem_id="output")
|
| 455 |
|
| 456 |
+
with gr.Row(elem_classes="gr-audio"):
|
| 457 |
tts_btn = gr.Button("π Read Aloud", elem_id="tts-btn")
|
| 458 |
tts_audio = gr.Audio(label="Audio", autoplay=False)
|
| 459 |
|
| 460 |
done_btn = gr.Button("β
Done", visible=False, elem_id="done-btn")
|
| 461 |
+
txt_file = gr.File(label="π Explanations (.txt)", elem_classes="gr-file")
|
| 462 |
+
pdf_file = gr.File(label="π Scene PDF",elem_classes="gr-file")
|
| 463 |
|
| 464 |
# States
|
| 465 |
scene_images = gr.State([])
|