Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,46 +52,94 @@ examples = [
|
|
| 52 |
["An astronaut on mars in a futuristic cyborg suit"],
|
| 53 |
]
|
| 54 |
|
| 55 |
-
css =
|
| 56 |
.gradio-container {
|
| 57 |
-
max-width:
|
| 58 |
margin: auto;
|
| 59 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
h1 {
|
| 61 |
text-align: center;
|
| 62 |
font-family: 'Pretendard', sans-serif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
}
|
| 64 |
.gr-button-primary {
|
| 65 |
background-color: #F97316 !important;
|
|
|
|
|
|
|
| 66 |
}
|
| 67 |
.gr-button-primary:hover {
|
| 68 |
background-color: #EA580C !important;
|
|
|
|
|
|
|
| 69 |
}
|
| 70 |
.footer-content {
|
| 71 |
text-align: center;
|
| 72 |
-
margin-top:
|
| 73 |
-
padding: 2rem
|
|
|
|
|
|
|
| 74 |
font-family: 'Pretendard', sans-serif;
|
| 75 |
-
|
| 76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
}
|
| 78 |
.visit-button {
|
| 79 |
background-color: #EA580C;
|
| 80 |
color: white !important;
|
| 81 |
-
padding:
|
| 82 |
-
border-radius:
|
| 83 |
-
font-weight:
|
| 84 |
text-decoration: none;
|
| 85 |
display: inline-block;
|
|
|
|
| 86 |
margin-top: 1rem;
|
| 87 |
-
|
|
|
|
| 88 |
}
|
| 89 |
.visit-button:hover {
|
| 90 |
background-color: #C2410C;
|
| 91 |
-
transform: translateY(-
|
| 92 |
-
box-shadow: 0 4px 6px
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
}
|
| 94 |
-
|
| 95 |
|
| 96 |
# Gradio 인터페이스 생성
|
| 97 |
with gr.Blocks(
|
|
@@ -120,10 +168,13 @@ with gr.Blocks(
|
|
| 120 |
gr.HTML(
|
| 121 |
"""
|
| 122 |
<h1>끝장AI FLUX.1 이미지 생성기</h1>
|
|
|
|
|
|
|
|
|
|
| 123 |
"""
|
| 124 |
)
|
| 125 |
|
| 126 |
-
with gr.Group():
|
| 127 |
with gr.Column():
|
| 128 |
prompt = gr.Textbox(
|
| 129 |
label="프롬프트",
|
|
|
|
| 52 |
["An astronaut on mars in a futuristic cyborg suit"],
|
| 53 |
]
|
| 54 |
|
| 55 |
+
css = '''
|
| 56 |
.gradio-container {
|
| 57 |
+
max-width: 1400px !important;
|
| 58 |
margin: auto;
|
| 59 |
}
|
| 60 |
+
/* 이미지 크기 조정 */
|
| 61 |
+
.image-container img {
|
| 62 |
+
max-height: 600px !important;
|
| 63 |
+
}
|
| 64 |
+
/* 이미지 슬라이더 크기 조정 */
|
| 65 |
+
.image-slider {
|
| 66 |
+
height: 600px !important;
|
| 67 |
+
max-height: 600px !important;
|
| 68 |
+
}
|
| 69 |
h1 {
|
| 70 |
text-align: center;
|
| 71 |
font-family: 'Pretendard', sans-serif;
|
| 72 |
+
color: #EA580C;
|
| 73 |
+
font-size: 2.5rem;
|
| 74 |
+
font-weight: 700;
|
| 75 |
+
margin-bottom: 1.5rem;
|
| 76 |
+
text-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
| 77 |
+
}
|
| 78 |
+
.subtitle {
|
| 79 |
+
text-align: center;
|
| 80 |
+
color: #4B5563;
|
| 81 |
+
font-size: 1.1rem;
|
| 82 |
+
margin-bottom: 2rem;
|
| 83 |
+
font-family: 'Pretendard', sans-serif;
|
| 84 |
}
|
| 85 |
.gr-button-primary {
|
| 86 |
background-color: #F97316 !important;
|
| 87 |
+
border: none !important;
|
| 88 |
+
box-shadow: 0 2px 4px rgba(234, 88, 12, 0.2) !important;
|
| 89 |
}
|
| 90 |
.gr-button-primary:hover {
|
| 91 |
background-color: #EA580C !important;
|
| 92 |
+
transform: translateY(-1px);
|
| 93 |
+
box-shadow: 0 4px 6px rgba(234, 88, 12, 0.25) !important;
|
| 94 |
}
|
| 95 |
.footer-content {
|
| 96 |
text-align: center;
|
| 97 |
+
margin-top: 3rem;
|
| 98 |
+
padding: 2rem;
|
| 99 |
+
background: linear-gradient(to bottom, #FFF7ED, white);
|
| 100 |
+
border-radius: 12px;
|
| 101 |
font-family: 'Pretendard', sans-serif;
|
| 102 |
+
}
|
| 103 |
+
.footer-content a {
|
| 104 |
+
color: #EA580C;
|
| 105 |
+
text-decoration: none;
|
| 106 |
+
font-weight: 500;
|
| 107 |
+
transition: all 0.2s;
|
| 108 |
+
}
|
| 109 |
+
.footer-content a:hover {
|
| 110 |
+
color: #C2410C;
|
| 111 |
}
|
| 112 |
.visit-button {
|
| 113 |
background-color: #EA580C;
|
| 114 |
color: white !important;
|
| 115 |
+
padding: 12px 24px;
|
| 116 |
+
border-radius: 8px;
|
| 117 |
+
font-weight: 600;
|
| 118 |
text-decoration: none;
|
| 119 |
display: inline-block;
|
| 120 |
+
transition: all 0.3s;
|
| 121 |
margin-top: 1rem;
|
| 122 |
+
box-shadow: 0 2px 4px rgba(234, 88, 12, 0.2);
|
| 123 |
+
font-size: 1.1rem;
|
| 124 |
}
|
| 125 |
.visit-button:hover {
|
| 126 |
background-color: #C2410C;
|
| 127 |
+
transform: translateY(-2px);
|
| 128 |
+
box-shadow: 0 4px 6px rgba(234, 88, 12, 0.25);
|
| 129 |
+
color: white !important;
|
| 130 |
+
}
|
| 131 |
+
.container-wrapper {
|
| 132 |
+
background: white;
|
| 133 |
+
border-radius: 16px;
|
| 134 |
+
padding: 2rem;
|
| 135 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
| 136 |
+
}
|
| 137 |
+
.image-container {
|
| 138 |
+
border-radius: 12px;
|
| 139 |
+
overflow: hidden;
|
| 140 |
+
border: 2px solid #F3F4F6;
|
| 141 |
}
|
| 142 |
+
'''
|
| 143 |
|
| 144 |
# Gradio 인터페이스 생성
|
| 145 |
with gr.Blocks(
|
|
|
|
| 168 |
gr.HTML(
|
| 169 |
"""
|
| 170 |
<h1>끝장AI FLUX.1 이미지 생성기</h1>
|
| 171 |
+
<div class="subtitle">
|
| 172 |
+
강력한 AI 기술로 당신의 상상을 현실로 만들어보세요
|
| 173 |
+
</div>
|
| 174 |
"""
|
| 175 |
)
|
| 176 |
|
| 177 |
+
with gr.Group(elem_classes="container-wrapper"):
|
| 178 |
with gr.Column():
|
| 179 |
prompt = gr.Textbox(
|
| 180 |
label="프롬프트",
|