Spaces:
Runtime error
Runtime error
erwold
commited on
Commit
·
4236cfe
1
Parent(s):
a349a7f
Initial Commit
Browse files
app.py
CHANGED
|
@@ -166,10 +166,10 @@ interface = FluxInterface()
|
|
| 166 |
with gr.Blocks(css="""
|
| 167 |
.container { max-width: 1200px; margin: auto; padding: 20px; }
|
| 168 |
.header { text-align: center; margin-bottom: 40px; }
|
| 169 |
-
.
|
| 170 |
-
.
|
| 171 |
-
.
|
| 172 |
-
.
|
| 173 |
""") as demo:
|
| 174 |
with gr.Column(elem_classes="container"):
|
| 175 |
gr.Markdown("""
|
|
@@ -180,71 +180,65 @@ with gr.Blocks(css="""
|
|
| 180 |
""")
|
| 181 |
|
| 182 |
with gr.Row():
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
submit_btn = gr.Button(
|
| 236 |
-
"Generate Variations",
|
| 237 |
-
variant="primary",
|
| 238 |
-
elem_classes="gr-button"
|
| 239 |
-
)
|
| 240 |
|
| 241 |
-
|
|
|
|
| 242 |
output_gallery = gr.Gallery(
|
| 243 |
label="Generated Variations",
|
| 244 |
columns=2,
|
| 245 |
rows=2,
|
| 246 |
height=600,
|
| 247 |
-
elem_classes="gr-gallery"
|
| 248 |
)
|
| 249 |
|
| 250 |
gr.Markdown("""
|
|
|
|
| 166 |
with gr.Blocks(css="""
|
| 167 |
.container { max-width: 1200px; margin: auto; padding: 20px; }
|
| 168 |
.header { text-align: center; margin-bottom: 40px; }
|
| 169 |
+
.input-panel { border: 1px solid #e0e0e0; padding: 20px; border-radius: 8px; background: white; }
|
| 170 |
+
.control-panel { padding: 10px; margin: 10px 0; }
|
| 171 |
+
.output-panel { border: 1px solid #e0e0e0; padding: 20px; border-radius: 8px; }
|
| 172 |
+
.submit-btn { height: 40px; margin: 10px 0; }
|
| 173 |
""") as demo:
|
| 174 |
with gr.Column(elem_classes="container"):
|
| 175 |
gr.Markdown("""
|
|
|
|
| 180 |
""")
|
| 181 |
|
| 182 |
with gr.Row():
|
| 183 |
+
# Input Column
|
| 184 |
+
with gr.Column(scale=1, min_width=400, elem_classes="input-panel"):
|
| 185 |
+
input_image = gr.Image(
|
| 186 |
+
label="Upload Image",
|
| 187 |
+
type="pil",
|
| 188 |
+
height=400
|
| 189 |
+
)
|
| 190 |
+
prompt = gr.Textbox(
|
| 191 |
+
label="Optional Text Prompt",
|
| 192 |
+
placeholder="Enter text prompt here (optional)",
|
| 193 |
+
lines=2
|
| 194 |
+
)
|
| 195 |
+
|
| 196 |
+
with gr.Column(elem_classes="control-panel"):
|
| 197 |
+
with gr.Row():
|
| 198 |
+
with gr.Column(scale=1):
|
| 199 |
+
guidance = gr.Slider(
|
| 200 |
+
minimum=1,
|
| 201 |
+
maximum=10,
|
| 202 |
+
value=3.5,
|
| 203 |
+
step=0.5,
|
| 204 |
+
label="Guidance Scale"
|
| 205 |
+
)
|
| 206 |
+
with gr.Column(scale=1):
|
| 207 |
+
steps = gr.Slider(
|
| 208 |
+
minimum=1,
|
| 209 |
+
maximum=50,
|
| 210 |
+
value=28,
|
| 211 |
+
step=1,
|
| 212 |
+
label="Number of Steps"
|
| 213 |
+
)
|
| 214 |
+
with gr.Row():
|
| 215 |
+
with gr.Column(scale=1):
|
| 216 |
+
num_images = gr.Slider(
|
| 217 |
+
minimum=1,
|
| 218 |
+
maximum=4,
|
| 219 |
+
value=2,
|
| 220 |
+
step=1,
|
| 221 |
+
label="Number of Images"
|
| 222 |
+
)
|
| 223 |
+
with gr.Column(scale=1):
|
| 224 |
+
seed = gr.Number(
|
| 225 |
+
label="Random Seed (optional)",
|
| 226 |
+
precision=0
|
| 227 |
+
)
|
| 228 |
+
|
| 229 |
+
submit_btn = gr.Button(
|
| 230 |
+
"Generate Variations",
|
| 231 |
+
variant="primary",
|
| 232 |
+
elem_classes="submit-btn"
|
| 233 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 234 |
|
| 235 |
+
# Output Column
|
| 236 |
+
with gr.Column(scale=1, min_width=400, elem_classes="output-panel"):
|
| 237 |
output_gallery = gr.Gallery(
|
| 238 |
label="Generated Variations",
|
| 239 |
columns=2,
|
| 240 |
rows=2,
|
| 241 |
height=600,
|
|
|
|
| 242 |
)
|
| 243 |
|
| 244 |
gr.Markdown("""
|