Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -227,7 +227,16 @@ def generate_poster(
|
|
227 |
def create_interface():
|
228 |
"""Create Gradio interface"""
|
229 |
|
230 |
-
with gr.Blocks(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
gr.HTML("<div style='text-align: center; width: 100%; margin: 20px 0;'><h1 style='margin: 0; font-size: 2.5em;'>PosterCraft-v1_RL</h1></div>")
|
232 |
|
233 |
with gr.Row():
|
@@ -248,7 +257,7 @@ def create_interface():
|
|
248 |
|
249 |
with gr.Column(scale=1):
|
250 |
gr.Markdown("### 2. Results")
|
251 |
-
image_output = gr.Image(label="Generated Image", type="pil", show_download_button=True, container=False)
|
252 |
recapped_prompt_output = gr.Textbox(label="Final Prompt Used", lines=5, interactive=False)
|
253 |
status_output = gr.Textbox(label="Status Log", lines=4, interactive=False)
|
254 |
|
|
|
227 |
def create_interface():
|
228 |
"""Create Gradio interface"""
|
229 |
|
230 |
+
with gr.Blocks(
|
231 |
+
theme=gr.themes.Soft(),
|
232 |
+
css="""
|
233 |
+
.preserve-aspect-ratio img {
|
234 |
+
object-fit: contain !important;
|
235 |
+
max-height: 300px !important;
|
236 |
+
width: auto !important;
|
237 |
+
}
|
238 |
+
"""
|
239 |
+
) as demo:
|
240 |
gr.HTML("<div style='text-align: center; width: 100%; margin: 20px 0;'><h1 style='margin: 0; font-size: 2.5em;'>PosterCraft-v1_RL</h1></div>")
|
241 |
|
242 |
with gr.Row():
|
|
|
257 |
|
258 |
with gr.Column(scale=1):
|
259 |
gr.Markdown("### 2. Results")
|
260 |
+
image_output = gr.Image(label="Generated Image", type="pil", show_download_button=True, height=300, container=False, elem_classes=["preserve-aspect-ratio"])
|
261 |
recapped_prompt_output = gr.Textbox(label="Final Prompt Used", lines=5, interactive=False)
|
262 |
status_output = gr.Textbox(label="Status Log", lines=4, interactive=False)
|
263 |
|