Update app.py
Browse files
app.py
CHANGED
@@ -554,58 +554,55 @@ def create_interface():
|
|
554 |
}
|
555 |
|
556 |
css = """
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
562 |
}
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
|
|
|
|
|
|
568 |
}
|
569 |
-
|
570 |
-
|
571 |
-
.gradio-
|
572 |
-
|
573 |
}
|
574 |
-
.gradio-
|
575 |
-
|
576 |
-
max-width: 100% !important;
|
577 |
}
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
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 |
|
603 |
with gr.Blocks(theme=gr.themes.Soft(), css=css) as app:
|
604 |
state = gr.State(value=initial_state)
|
605 |
-
|
606 |
-
# 화면 크기에 따라 로고 이미지 설정
|
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,
|
|
|
554 |
}
|
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 |
|
603 |
with gr.Blocks(theme=gr.themes.Soft(), css=css) as app:
|
604 |
state = gr.State(value=initial_state)
|
605 |
+
|
|
|
|
|
|
|
606 |
with gr.Row(elem_id="logo-container"):
|
607 |
gr.Image(value="/static/DIGITAL_GUTPAN_LOGO_w.png",
|
608 |
show_label=False,
|