Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -566,6 +566,173 @@ def get_random_placeholder():
|
|
| 566 |
def update_placeholder():
|
| 567 |
return gr.update(placeholder=get_random_placeholder())
|
| 568 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 569 |
|
| 570 |
def create_main_interface():
|
| 571 |
"""๋ฉ์ธ ์ธํฐํ์ด์ค ์์ฑ ํจ์"""
|
|
|
|
| 566 |
def update_placeholder():
|
| 567 |
return gr.update(placeholder=get_random_placeholder())
|
| 568 |
|
| 569 |
+
custom_css = """
|
| 570 |
+
/* ์ ์ฒด ์ปจํ
์ด๋ ์คํ์ผ๋ง */
|
| 571 |
+
.main-tabs {
|
| 572 |
+
background: #ffffff;
|
| 573 |
+
border-radius: 15px;
|
| 574 |
+
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
|
| 575 |
+
padding: 20px;
|
| 576 |
+
margin: 20px;
|
| 577 |
+
}
|
| 578 |
+
|
| 579 |
+
/* ์ข์ธก ํจ๋ ์คํ์ผ๋ง */
|
| 580 |
+
.left-panel {
|
| 581 |
+
background: #f8f9fa;
|
| 582 |
+
border-radius: 12px;
|
| 583 |
+
padding: 20px;
|
| 584 |
+
margin: 10px;
|
| 585 |
+
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
|
| 586 |
+
}
|
| 587 |
+
|
| 588 |
+
/* ์ฐ์ธก ํจ๋ ์คํ์ผ๋ง */
|
| 589 |
+
.right-panel {
|
| 590 |
+
background: #ffffff;
|
| 591 |
+
border-radius: 12px;
|
| 592 |
+
padding: 20px;
|
| 593 |
+
margin: 10px;
|
| 594 |
+
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
|
| 595 |
+
}
|
| 596 |
+
|
| 597 |
+
/* ์
๋ ฅ ์์ญ ์คํ์ผ๋ง */
|
| 598 |
+
.custom-textarea {
|
| 599 |
+
background: #ffffff !important;
|
| 600 |
+
border: 1px solid #e0e0e0 !important;
|
| 601 |
+
border-radius: 10px !important;
|
| 602 |
+
padding: 15px !important;
|
| 603 |
+
min-height: 150px !important;
|
| 604 |
+
font-family: -apple-system, BlinkMacSystemFont, sans-serif !important;
|
| 605 |
+
margin-bottom: 20px !important;
|
| 606 |
+
}
|
| 607 |
+
|
| 608 |
+
.custom-textarea:focus {
|
| 609 |
+
border-color: #007aff !important;
|
| 610 |
+
box-shadow: 0 0 0 2px rgba(0,122,255,0.2) !important;
|
| 611 |
+
}
|
| 612 |
+
|
| 613 |
+
/* ๋ฒํผ ์คํ์ผ๋ง */
|
| 614 |
+
.generate-btn {
|
| 615 |
+
background: #007aff !important;
|
| 616 |
+
color: white !important;
|
| 617 |
+
border-radius: 8px !important;
|
| 618 |
+
padding: 10px 20px !important;
|
| 619 |
+
font-weight: 500 !important;
|
| 620 |
+
transition: all 0.3s ease !important;
|
| 621 |
+
border: none !important;
|
| 622 |
+
box-shadow: 0 2px 4px rgba(0,122,255,0.2) !important;
|
| 623 |
+
}
|
| 624 |
+
|
| 625 |
+
.enhance-btn, .share-btn {
|
| 626 |
+
background: white !important;
|
| 627 |
+
border-radius: 8px !important;
|
| 628 |
+
padding: 10px 20px !important;
|
| 629 |
+
font-weight: 500 !important;
|
| 630 |
+
transition: all 0.3s ease !important;
|
| 631 |
+
}
|
| 632 |
+
|
| 633 |
+
.enhance-btn {
|
| 634 |
+
color: #007aff !important;
|
| 635 |
+
border: 1px solid #007aff !important;
|
| 636 |
+
}
|
| 637 |
+
|
| 638 |
+
.share-btn {
|
| 639 |
+
color: #28c840 !important;
|
| 640 |
+
border: 1px solid #28c840 !important;
|
| 641 |
+
}
|
| 642 |
+
|
| 643 |
+
/* ๋ฒํผ ํธ๋ฒ ํจ๊ณผ */
|
| 644 |
+
.generate-btn:hover {
|
| 645 |
+
background: #0056b3 !important;
|
| 646 |
+
transform: translateY(-1px);
|
| 647 |
+
}
|
| 648 |
+
|
| 649 |
+
.enhance-btn:hover {
|
| 650 |
+
background: rgba(0,122,255,0.1) !important;
|
| 651 |
+
transform: translateY(-1px);
|
| 652 |
+
}
|
| 653 |
+
|
| 654 |
+
.share-btn:hover {
|
| 655 |
+
background: rgba(40,200,64,0.1) !important;
|
| 656 |
+
transform: translateY(-1px);
|
| 657 |
+
}
|
| 658 |
+
|
| 659 |
+
/* ๋ชจ๋ ์ ํ๊ธฐ ์คํ์ผ๋ง */
|
| 660 |
+
.mode-selector {
|
| 661 |
+
background: white !important;
|
| 662 |
+
padding: 15px !important;
|
| 663 |
+
border-radius: 10px !important;
|
| 664 |
+
margin-bottom: 20px !important;
|
| 665 |
+
box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
|
| 666 |
+
}
|
| 667 |
+
|
| 668 |
+
/* ๋ฏธ๋ฆฌ๋ณด๊ธฐ ์ฐฝ ์คํ์ผ๋ง */
|
| 669 |
+
.window-frame {
|
| 670 |
+
background: white;
|
| 671 |
+
border-radius: 10px;
|
| 672 |
+
overflow: hidden;
|
| 673 |
+
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
| 674 |
+
}
|
| 675 |
+
|
| 676 |
+
.window-header {
|
| 677 |
+
background: #f8f9fa;
|
| 678 |
+
padding: 10px 15px;
|
| 679 |
+
border-bottom: 1px solid #e0e0e0;
|
| 680 |
+
display: flex;
|
| 681 |
+
align-items: center;
|
| 682 |
+
}
|
| 683 |
+
|
| 684 |
+
.window-controls {
|
| 685 |
+
display: flex;
|
| 686 |
+
gap: 8px;
|
| 687 |
+
}
|
| 688 |
+
|
| 689 |
+
.control {
|
| 690 |
+
width: 12px;
|
| 691 |
+
height: 12px;
|
| 692 |
+
border-radius: 50%;
|
| 693 |
+
}
|
| 694 |
+
|
| 695 |
+
.close { background: #ff5f57; }
|
| 696 |
+
.minimize { background: #febc2e; }
|
| 697 |
+
.maximize { background: #28c840; }
|
| 698 |
+
|
| 699 |
+
/* ๊ฒฐ๊ณผ ์์ญ ์คํ์ผ๋ง */
|
| 700 |
+
.html_content {
|
| 701 |
+
background: white;
|
| 702 |
+
border-radius: 10px;
|
| 703 |
+
padding: 20px;
|
| 704 |
+
margin-top: 15px;
|
| 705 |
+
min-height: 400px;
|
| 706 |
+
}
|
| 707 |
+
|
| 708 |
+
/* ๋ก๋ฉ ์ํ ์คํ์ผ๋ง */
|
| 709 |
+
.right_content {
|
| 710 |
+
padding: 40px;
|
| 711 |
+
text-align: center;
|
| 712 |
+
}
|
| 713 |
+
|
| 714 |
+
/* ์๋ฌ ์ํ ์คํ์ผ๋ง */
|
| 715 |
+
.error-content {
|
| 716 |
+
background: #fff2f0;
|
| 717 |
+
border: 1px solid #ff4d4f;
|
| 718 |
+
padding: 20px;
|
| 719 |
+
border-radius: 8px;
|
| 720 |
+
margin-top: 15px;
|
| 721 |
+
}
|
| 722 |
+
|
| 723 |
+
/* ๋ฐ์ํ ๋์์ธ */
|
| 724 |
+
@media (max-width: 768px) {
|
| 725 |
+
.main-tabs {
|
| 726 |
+
margin: 10px;
|
| 727 |
+
padding: 10px;
|
| 728 |
+
}
|
| 729 |
+
|
| 730 |
+
.left-panel, .right-panel {
|
| 731 |
+
margin: 5px;
|
| 732 |
+
padding: 10px;
|
| 733 |
+
}
|
| 734 |
+
}
|
| 735 |
+
"""
|
| 736 |
|
| 737 |
def create_main_interface():
|
| 738 |
"""๋ฉ์ธ ์ธํฐํ์ด์ค ์์ฑ ํจ์"""
|