Spaces:
Sleeping
Sleeping
Fix gallery height
Browse files
app.py
CHANGED
|
@@ -26,8 +26,8 @@ def get_device():
|
|
| 26 |
|
| 27 |
|
| 28 |
examples = [
|
| 29 |
-
"A
|
| 30 |
-
"
|
| 31 |
]
|
| 32 |
|
| 33 |
|
|
@@ -125,7 +125,7 @@ def mark_all_running():
|
|
| 125 |
|
| 126 |
|
| 127 |
with gr.Blocks() as demo:
|
| 128 |
-
gr.Markdown("#
|
| 129 |
|
| 130 |
with gr.Row():
|
| 131 |
prompt = gr.Textbox(label="Prompt", placeholder="Enter prompt here", value=examples[0], lines=1)
|
|
@@ -145,7 +145,8 @@ with gr.Blocks() as demo:
|
|
| 145 |
|
| 146 |
with gr.Column(scale=2):
|
| 147 |
pretrained_gallery = gr.Gallery(
|
| 148 |
-
label="Pretrained outputs", show_label=True, elem_id="pretrained_gallery", height="70vw", columns=4
|
|
|
|
| 149 |
)
|
| 150 |
pretrained_info = gr.Textbox(label="Pretrained info", interactive=False)
|
| 151 |
|
|
@@ -187,7 +188,8 @@ with gr.Blocks() as demo:
|
|
| 187 |
|
| 188 |
with gr.Column(scale=2):
|
| 189 |
smc_grad_gallery = gr.Gallery(
|
| 190 |
-
label="SMC-grad outputs", show_label=True, elem_id="smc_grad_gallery", height="70vw", columns=4
|
|
|
|
| 191 |
)
|
| 192 |
smc_grad_info = gr.Textbox(label="SMC-grad info", interactive=False)
|
| 193 |
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
examples = [
|
| 29 |
+
"A photo of a yellow bird and a black motorcycle",
|
| 30 |
+
"A green stop sign in a red field",
|
| 31 |
]
|
| 32 |
|
| 33 |
|
|
|
|
| 125 |
|
| 126 |
|
| 127 |
with gr.Blocks() as demo:
|
| 128 |
+
gr.Markdown("# Prompt alignment for Meissonic using SMC")
|
| 129 |
|
| 130 |
with gr.Row():
|
| 131 |
prompt = gr.Textbox(label="Prompt", placeholder="Enter prompt here", value=examples[0], lines=1)
|
|
|
|
| 145 |
|
| 146 |
with gr.Column(scale=2):
|
| 147 |
pretrained_gallery = gr.Gallery(
|
| 148 |
+
label="Pretrained outputs", show_label=True, elem_id="pretrained_gallery", height="70vw", columns=4,
|
| 149 |
+
object_fit="contain",
|
| 150 |
)
|
| 151 |
pretrained_info = gr.Textbox(label="Pretrained info", interactive=False)
|
| 152 |
|
|
|
|
| 188 |
|
| 189 |
with gr.Column(scale=2):
|
| 190 |
smc_grad_gallery = gr.Gallery(
|
| 191 |
+
label="SMC-grad outputs", show_label=True, elem_id="smc_grad_gallery", height="70vw", columns=4,
|
| 192 |
+
object_fit="contain",
|
| 193 |
)
|
| 194 |
smc_grad_info = gr.Textbox(label="SMC-grad info", interactive=False)
|
| 195 |
|