Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -168,7 +168,7 @@ custom_html="""
|
|
168 |
margin-top:-10px;
|
169 |
margin-bottom: 10px;
|
170 |
}
|
171 |
-
.
|
172 |
background-color: White;
|
173 |
font-size: 30px;
|
174 |
font-weight: bold;
|
@@ -372,162 +372,13 @@ def erase_and_record():
|
|
372 |
# Gradio Interface
|
373 |
def gradio_app():
|
374 |
# reset_state()
|
375 |
-
with gr.Blocks(css=
|
376 |
-
/* Body Styles */
|
377 |
-
.gr-container {
|
378 |
-
font-family: Arial, sans-serif !important;
|
379 |
-
background-color: #F5F5DC !important;
|
380 |
-
color: #333 !important;
|
381 |
-
}
|
382 |
-
|
383 |
-
/* Row Styles */
|
384 |
-
.gr-row {
|
385 |
-
display: flex;
|
386 |
-
justify-content: center;
|
387 |
-
align-items: center;
|
388 |
-
margin: 15px 0;
|
389 |
-
padding: 10px;
|
390 |
-
width: 100%;
|
391 |
-
}
|
392 |
-
|
393 |
-
/* Audio Component Styles */
|
394 |
-
.gr-audio {
|
395 |
-
background-color: #F5F5DC;
|
396 |
-
padding: 10px 10px;
|
397 |
-
border-radius: 10px;
|
398 |
-
font-size:20px;
|
399 |
-
color:blue;
|
400 |
-
}
|
401 |
-
|
402 |
-
.gr-audio button[title="Clear"] {
|
403 |
-
display: none !important;
|
404 |
-
}
|
405 |
-
|
406 |
-
/* Prompt style */
|
407 |
-
.gr-prompt {
|
408 |
-
background-color: #F5F5DC;
|
409 |
-
color: #00008B; /* Deep Blue */
|
410 |
-
padding: 10px 10px;
|
411 |
-
border-radius: 10px;
|
412 |
-
|
413 |
-
}
|
414 |
-
.gr-submit_button{
|
415 |
-
background-color: #28a745;
|
416 |
-
color: white;
|
417 |
-
border: none;
|
418 |
-
padding: 10px 20px;
|
419 |
-
border-radius: 20px;
|
420 |
-
font-size: 20px;
|
421 |
-
cursor: pointer;
|
422 |
-
margin: 5px;
|
423 |
-
}
|
424 |
-
|
425 |
-
/* Erase button */
|
426 |
-
.gr-erase_button {
|
427 |
-
background-color: #EE4B2B;
|
428 |
-
color: white;
|
429 |
-
border: none;
|
430 |
-
padding: 10px 20px;
|
431 |
-
border-radius: 20px;
|
432 |
-
font-size: 20px;
|
433 |
-
cursor: pointer;
|
434 |
-
margin: 5px;
|
435 |
-
}
|
436 |
-
|
437 |
-
.gr-erase_button:hover {
|
438 |
-
background-color: #A52A2A;
|
439 |
-
}
|
440 |
-
|
441 |
-
/* NExt button */
|
442 |
-
.gr-next_button {
|
443 |
-
background-color: #28a745;
|
444 |
-
color: white;
|
445 |
-
border: none;
|
446 |
-
padding: 10px 20px;
|
447 |
-
border-radius: 20px;
|
448 |
-
font-size: 20px;
|
449 |
-
cursor: pointer;
|
450 |
-
margin: 5px;
|
451 |
-
}
|
452 |
-
|
453 |
-
.gr-next_button:hover {
|
454 |
-
background-color: #218838;
|
455 |
-
}
|
456 |
-
|
457 |
-
.warning-alert {
|
458 |
-
font-size: 16px;
|
459 |
-
color: black;
|
460 |
-
margin-top: 2px;
|
461 |
-
text-align: center;
|
462 |
-
font-weight: bold;
|
463 |
-
border: 1px solid #d9534f;
|
464 |
-
padding: 10px;
|
465 |
-
background-color: #FFED01; /* Light red background for alert */
|
466 |
-
|
467 |
-
}
|
468 |
-
.fail-alert {
|
469 |
-
font-size: 16px;
|
470 |
-
color: black;
|
471 |
-
margin-top: 2px;
|
472 |
-
text-align: center;
|
473 |
-
font-weight: bold;
|
474 |
-
border: 1px solid #d9534f;
|
475 |
-
padding: 10px;
|
476 |
-
background-color: #FF0000; /* Light red background for alert */
|
477 |
-
}
|
478 |
-
.sucess-alert {
|
479 |
-
font-size: 16px;
|
480 |
-
color: black;
|
481 |
-
margin-top: 2px;
|
482 |
-
text-align: center;
|
483 |
-
font-weight: bold;
|
484 |
-
border: 1px solid #d9534f;
|
485 |
-
padding: 10px;
|
486 |
-
background-color:#90EE90; /* Light red background for alert */
|
487 |
-
}
|
488 |
-
.gr-story_legacy_heading {
|
489 |
-
background-color: White;
|
490 |
-
font-size: 30px;
|
491 |
-
font-weight: bold;
|
492 |
-
color:#00008B;
|
493 |
-
text-align: left;
|
494 |
-
margin-top:-10px;
|
495 |
-
margin-bottom: 10px;
|
496 |
-
}
|
497 |
-
.project-code {
|
498 |
-
background-color: White;
|
499 |
-
font-size: 30px;
|
500 |
-
font-weight: bold;
|
501 |
-
color:#00008B;
|
502 |
-
text-align: right;
|
503 |
-
margin-top:-10px;
|
504 |
-
margin-bottom: 10px;
|
505 |
-
}
|
506 |
-
.prompt-class {
|
507 |
-
font-weight: bold;
|
508 |
-
color:#00008B;
|
509 |
-
font-size: 20px;
|
510 |
-
|
511 |
-
}
|
512 |
-
.gr-markdown {
|
513 |
-
position: fixed;
|
514 |
-
width: 95%;
|
515 |
-
z-index: 1000;
|
516 |
-
border-radius: 5px;
|
517 |
-
margin-top:-10px;
|
518 |
-
margin-bottom: 20px;
|
519 |
-
}
|
520 |
-
.prompt-text {
|
521 |
-
font-size: 15px;
|
522 |
-
}
|
523 |
-
"""
|
524 |
-
) as demo:
|
525 |
with gr.Row():
|
526 |
gr.Markdown("""
|
527 |
-
<div class ="gr-story_legacy_heading"
|
528 |
""")
|
529 |
gr.Markdown(f"""
|
530 |
-
<div
|
531 |
""")
|
532 |
|
533 |
with gr.Row():
|
|
|
168 |
margin-top:-10px;
|
169 |
margin-bottom: 10px;
|
170 |
}
|
171 |
+
.gr-project_code {
|
172 |
background-color: White;
|
173 |
font-size: 30px;
|
174 |
font-weight: bold;
|
|
|
372 |
# Gradio Interface
|
373 |
def gradio_app():
|
374 |
# reset_state()
|
375 |
+
with gr.Blocks(css=custom_html) as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
with gr.Row():
|
377 |
gr.Markdown("""
|
378 |
+
<div class ="gr-story_legacy_heading">StoryLegacy</div>
|
379 |
""")
|
380 |
gr.Markdown(f"""
|
381 |
+
<div class="gr-project_code">Project: {PROJECT_CODE}</div>
|
382 |
""")
|
383 |
|
384 |
with gr.Row():
|