Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -103,33 +103,46 @@ STYLE_PRESETS = [
|
|
103 |
}
|
104 |
]
|
105 |
|
106 |
-
# Updated CSS for
|
107 |
css = '''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
#component-0 {
|
109 |
-
|
110 |
-
margin: auto;
|
111 |
-
padding: 20px;
|
112 |
-
background: linear-gradient(135deg, #1e1e2f, #2e2e48);
|
113 |
min-height: 100vh;
|
|
|
|
|
114 |
}
|
115 |
|
|
|
116 |
.container {
|
117 |
background-color: #ffffff;
|
118 |
-
border-radius:
|
119 |
padding: 30px;
|
120 |
-
|
|
|
|
|
121 |
}
|
122 |
|
|
|
123 |
.header {
|
124 |
text-align: center;
|
125 |
margin-bottom: 2rem;
|
126 |
-
background:
|
127 |
padding: 2rem;
|
128 |
-
border-radius:
|
129 |
-
color: #
|
130 |
-
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
131 |
}
|
132 |
|
|
|
133 |
.preset-grid {
|
134 |
display: grid;
|
135 |
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
@@ -137,42 +150,50 @@ css = '''
|
|
137 |
margin: 1rem 0;
|
138 |
}
|
139 |
|
|
|
140 |
.preset-card {
|
141 |
-
background: #
|
142 |
padding: 1rem;
|
143 |
border-radius: 8px;
|
144 |
cursor: pointer;
|
145 |
transition: all 0.3s ease;
|
146 |
-
border:
|
147 |
text-align: center;
|
|
|
|
|
148 |
}
|
149 |
|
150 |
.preset-card:hover {
|
151 |
transform: translateY(-3px);
|
152 |
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
|
153 |
-
background: #
|
154 |
}
|
155 |
|
|
|
156 |
.preset-emoji {
|
157 |
font-size: 2.5rem;
|
158 |
margin-bottom: 0.5rem;
|
159 |
}
|
160 |
|
|
|
161 |
.input-container {
|
162 |
-
background: #
|
163 |
padding: 1.5rem;
|
164 |
border-radius: 8px;
|
165 |
margin-bottom: 1rem;
|
|
|
166 |
}
|
167 |
|
|
|
168 |
.output-gallery {
|
169 |
-
border: 2px solid #
|
170 |
border-radius: 8px;
|
171 |
padding: 10px;
|
172 |
background: #ffffff;
|
173 |
}
|
174 |
|
175 |
-
|
|
|
176 |
'''
|
177 |
|
178 |
@spaces.GPU(enable_queue=True)
|
@@ -225,7 +246,7 @@ def create_preset_click_handler(idx, prompt_input):
|
|
225 |
return handler
|
226 |
|
227 |
with gr.Blocks(css=css) as demo:
|
228 |
-
|
229 |
|
230 |
with gr.Column(elem_classes="container"):
|
231 |
with gr.Column(elem_classes="header"):
|
|
|
103 |
}
|
104 |
]
|
105 |
|
106 |
+
# Updated CSS for full-screen layout and clearer contrast
|
107 |
css = '''
|
108 |
+
/* Make the overall container take the full width and height of the viewport */
|
109 |
+
html, body {
|
110 |
+
margin: 0;
|
111 |
+
padding: 0;
|
112 |
+
height: 100%;
|
113 |
+
background: #f0f2f5;
|
114 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
115 |
+
}
|
116 |
+
|
117 |
+
/* Outer container spans full width */
|
118 |
#component-0 {
|
119 |
+
width: 100%;
|
|
|
|
|
|
|
120 |
min-height: 100vh;
|
121 |
+
padding: 20px;
|
122 |
+
box-sizing: border-box;
|
123 |
}
|
124 |
|
125 |
+
/* Main content container with clear, high-contrast colors */
|
126 |
.container {
|
127 |
background-color: #ffffff;
|
128 |
+
border-radius: 10px;
|
129 |
padding: 30px;
|
130 |
+
margin: auto;
|
131 |
+
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
|
132 |
+
max-width: 1400px;
|
133 |
}
|
134 |
|
135 |
+
/* Header styling with full contrast */
|
136 |
.header {
|
137 |
text-align: center;
|
138 |
margin-bottom: 2rem;
|
139 |
+
background: #003366;
|
140 |
padding: 2rem;
|
141 |
+
border-radius: 10px;
|
142 |
+
color: #ffffff;
|
|
|
143 |
}
|
144 |
|
145 |
+
/* Preset grid styling */
|
146 |
.preset-grid {
|
147 |
display: grid;
|
148 |
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
|
|
150 |
margin: 1rem 0;
|
151 |
}
|
152 |
|
153 |
+
/* Preset cards with clear borders and text */
|
154 |
.preset-card {
|
155 |
+
background: #ffffff;
|
156 |
padding: 1rem;
|
157 |
border-radius: 8px;
|
158 |
cursor: pointer;
|
159 |
transition: all 0.3s ease;
|
160 |
+
border: 2px solid #003366;
|
161 |
text-align: center;
|
162 |
+
color: #003366;
|
163 |
+
font-weight: bold;
|
164 |
}
|
165 |
|
166 |
.preset-card:hover {
|
167 |
transform: translateY(-3px);
|
168 |
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
|
169 |
+
background: #e6f0ff;
|
170 |
}
|
171 |
|
172 |
+
/* Larger emoji styling */
|
173 |
.preset-emoji {
|
174 |
font-size: 2.5rem;
|
175 |
margin-bottom: 0.5rem;
|
176 |
}
|
177 |
|
178 |
+
/* Input container with clear text and background */
|
179 |
.input-container {
|
180 |
+
background: #e6f0ff;
|
181 |
padding: 1.5rem;
|
182 |
border-radius: 8px;
|
183 |
margin-bottom: 1rem;
|
184 |
+
color: #003366;
|
185 |
}
|
186 |
|
187 |
+
/* Output gallery with a clear border and white background */
|
188 |
.output-gallery {
|
189 |
+
border: 2px solid #003366;
|
190 |
border-radius: 8px;
|
191 |
padding: 10px;
|
192 |
background: #ffffff;
|
193 |
}
|
194 |
|
195 |
+
/* Hide footer */
|
196 |
+
footer { display: none !important; }
|
197 |
'''
|
198 |
|
199 |
@spaces.GPU(enable_queue=True)
|
|
|
246 |
return handler
|
247 |
|
248 |
with gr.Blocks(css=css) as demo:
|
249 |
+
|
250 |
|
251 |
with gr.Column(elem_classes="container"):
|
252 |
with gr.Column(elem_classes="header"):
|