Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
03aa30c
1
Parent(s):
ade193e
Updated app
Browse files
app.py
CHANGED
@@ -67,15 +67,7 @@ def process_inputs(prompt, word_list, seed, layer_start_index, timestep_start_in
|
|
67 |
|
68 |
num_rows = math.ceil(len(all_images_and_labels) / COLUMNS)
|
69 |
|
70 |
-
|
71 |
-
label="Generated images",
|
72 |
-
show_label=True,
|
73 |
-
columns=[COLUMNS],
|
74 |
-
rows=[num_rows],
|
75 |
-
object_fit="contain"
|
76 |
-
)
|
77 |
-
|
78 |
-
return gallery
|
79 |
|
80 |
with gr.Blocks(
|
81 |
css="""
|
@@ -143,10 +135,10 @@ with gr.Blocks(
|
|
143 |
submit_btn.click(
|
144 |
fn=process_inputs,
|
145 |
inputs=[prompt, words, seed, layer_start_index, timestep_start_index],
|
146 |
-
outputs=[gallery]
|
147 |
)
|
148 |
|
149 |
-
gr.Examples(examples=EXAMPLES, inputs=[prompt, words, seed, layer_start_index, timestep_start_index], outputs=[gallery], fn=process_inputs, cache_examples=False)
|
150 |
|
151 |
# Automatically process the first example on launch
|
152 |
# demo.load(process_inputs, inputs=[prompt, words, seed, layer_start_index, timestep_start_index], outputs=[gallery])
|
|
|
67 |
|
68 |
num_rows = math.ceil(len(all_images_and_labels) / COLUMNS)
|
69 |
|
70 |
+
return all_images_and_labels, num_rows
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
with gr.Blocks(
|
73 |
css="""
|
|
|
135 |
submit_btn.click(
|
136 |
fn=process_inputs,
|
137 |
inputs=[prompt, words, seed, layer_start_index, timestep_start_index],
|
138 |
+
outputs=[gallery, gallery.update(rows=True)]
|
139 |
)
|
140 |
|
141 |
+
gr.Examples(examples=EXAMPLES, inputs=[prompt, words, seed, layer_start_index, timestep_start_index], outputs=[gallery, gallery.update(rows=True)], fn=process_inputs, cache_examples=False)
|
142 |
|
143 |
# Automatically process the first example on launch
|
144 |
# demo.load(process_inputs, inputs=[prompt, words, seed, layer_start_index, timestep_start_index], outputs=[gallery])
|