haepada commited on
Commit
db9f81c
·
verified ·
1 Parent(s): 7c45562

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -37
app.py CHANGED
@@ -555,69 +555,48 @@ def create_interface():
555
 
556
  css = """
557
  @media (max-width: 600px) {
558
- .container { padding: 10px !important; }
559
- .gradio-button { width: 100% !important; }
560
- #main-image { width: 100% !important; height: auto !important; }
561
  #logo-image {
562
- content: url('/static/DIGITAL_GUTPAN_LOGO_m.png'); /* Mobile logo */
563
- width: 75px !important; /* 50% of the desktop size for mobile */
564
- height: auto;
565
  }
 
566
  .gradio-button {
567
  width: 100% !important;
568
  margin: 5px 0 !important;
569
- min-height: 44px !important; /* Improved touch area for mobile */
 
 
 
 
 
570
  }
571
- .gradio-textbox { width: 100% !important; }
572
- .gradio-audio { width: 100% !important; }
573
- .gradio-image { width: 100% !important; }
574
- #audio-recorder { width: 100% !important; }
575
- #result-image { width: 100% !important; }
576
  .gradio-dataframe {
577
  overflow-x: auto !important;
578
  max-width: 100% !important;
579
  }
580
  }
581
 
582
- /* Desktop view */
583
  @media (min-width: 601px) {
584
  #logo-image {
585
- content: url('/static/DIGITAL_GUTPAN_LOGO_w.png'); /* Desktop logo */
586
- width: auto; /* Use the image's original width */
587
  height: auto;
588
- display: block;
589
- margin: 0 auto;
590
  }
591
  }
592
 
593
- /* Overall UI Enhancements */
594
  .gradio-button {
595
  transition: all 0.3s ease;
596
  }
597
  .gradio-button:active {
598
  transform: scale(0.98);
599
  }
600
- /* Logo Container Styling */
601
  #logo-container {
602
- background: transparent !important;
603
- padding: 0;
604
- margin: 0 auto;
605
  text-align: center;
606
- }
607
-
608
- /* Main Image Styling */
609
- .main-image-container {
610
- background: none;
611
- text-align: center;
612
- margin-top: 20px;
613
- margin-bottom: 80px;
614
- }
615
- #main-image {
616
- width: 600px;
617
- height: 600px;
618
  margin: 0 auto;
619
- display: block;
620
- border-radius: 8px;
621
  }
622
  """
623
 
@@ -628,7 +607,10 @@ def create_interface():
628
  logo_image_path = "/static/DIGITAL_GUTPAN_LOGO_m.png" if request.user_agent.platform == 'mobile' else "/static/DIGITAL_GUTPAN_LOGO_w.png"
629
 
630
  with gr.Row(elem_id="logo-container"):
631
- gr.Image(value=logo_image_path, show_label=False, interactive=False, elem_id="logo-image")
 
 
 
632
 
633
  with gr.Tabs(selected=0) as tabs:
634
  # 입장 탭 (축원 포함)
 
555
 
556
  css = """
557
  @media (max-width: 600px) {
 
 
 
558
  #logo-image {
559
+ content: url('/static/DIGITAL_GUTPAN_LOGO_m.png') !important;
560
+ width: 75px !important;
561
+ height: auto !important;
562
  }
563
+ .container { padding: 10px !important; }
564
  .gradio-button {
565
  width: 100% !important;
566
  margin: 5px 0 !important;
567
+ min-height: 44px !important;
568
+ }
569
+ .gradio-textbox,
570
+ .gradio-audio,
571
+ .gradio-image {
572
+ width: 100% !important;
573
  }
 
 
 
 
 
574
  .gradio-dataframe {
575
  overflow-x: auto !important;
576
  max-width: 100% !important;
577
  }
578
  }
579
 
580
+ /* 데스크톱 */
581
  @media (min-width: 601px) {
582
  #logo-image {
583
+ content: url('/static/DIGITAL_GUTPAN_LOGO_w.png');
584
+ width: auto;
585
  height: auto;
 
 
586
  }
587
  }
588
 
589
+ /* 공통 스타일 */
590
  .gradio-button {
591
  transition: all 0.3s ease;
592
  }
593
  .gradio-button:active {
594
  transform: scale(0.98);
595
  }
 
596
  #logo-container {
 
 
 
597
  text-align: center;
 
 
 
 
 
 
 
 
 
 
 
 
598
  margin: 0 auto;
599
+ padding: 20px 0;
 
600
  }
601
  """
602
 
 
607
  logo_image_path = "/static/DIGITAL_GUTPAN_LOGO_m.png" if request.user_agent.platform == 'mobile' else "/static/DIGITAL_GUTPAN_LOGO_w.png"
608
 
609
  with gr.Row(elem_id="logo-container"):
610
+ gr.Image(value="/static/DIGITAL_GUTPAN_LOGO_w.png",
611
+ show_label=False,
612
+ interactive=False,
613
+ elem_id="logo-image")
614
 
615
  with gr.Tabs(selected=0) as tabs:
616
  # 입장 탭 (축원 포함)