openfree commited on
Commit
028bd37
ยท
verified ยท
1 Parent(s): 3cfc712

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +167 -0
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
  """๋ฉ”์ธ ์ธํ„ฐํŽ˜์ด์Šค ์ƒ์„ฑ ํ•จ์ˆ˜"""