Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -182,9 +182,9 @@ with gr.Blocks(title="BLIP3-o") as demo:
|
|
| 182 |
|
| 183 |
|
| 184 |
@spaces.GPU
|
| 185 |
-
def run_generate_image_tab(prompt, seed, guidance, progress=gr.Progress(track_tqdm=True)):
|
| 186 |
# Seed is already finalized by the randomize_seed_fn in the click chain
|
| 187 |
-
imgs = generate_image(prompt, seed, guidance, progress=progress)
|
| 188 |
return (
|
| 189 |
gr.update(value=imgs, visible=True),
|
| 190 |
gr.update(value="", visible=False)
|
|
@@ -218,8 +218,6 @@ with gr.Blocks(title="BLIP3-o") as demo:
|
|
| 218 |
gr.update(value="", visible=False) # output_text (reset and hide)
|
| 219 |
)
|
| 220 |
|
| 221 |
-
# Event listeners for Text -> Image
|
| 222 |
-
# Chain seed randomization → run_generate_image_tab
|
| 223 |
gen_inputs = [prompt_gen_input, seed_slider, guidance_slider, images_to_generate]
|
| 224 |
|
| 225 |
run_image_gen_btn.click(
|
|
|
|
| 182 |
|
| 183 |
|
| 184 |
@spaces.GPU
|
| 185 |
+
def run_generate_image_tab(prompt, seed, guidance, num_images, progress=gr.Progress(track_tqdm=True)):
|
| 186 |
# Seed is already finalized by the randomize_seed_fn in the click chain
|
| 187 |
+
imgs = generate_image(prompt, seed, guidance, num_images, progress=progress)
|
| 188 |
return (
|
| 189 |
gr.update(value=imgs, visible=True),
|
| 190 |
gr.update(value="", visible=False)
|
|
|
|
| 218 |
gr.update(value="", visible=False) # output_text (reset and hide)
|
| 219 |
)
|
| 220 |
|
|
|
|
|
|
|
| 221 |
gen_inputs = [prompt_gen_input, seed_slider, guidance_slider, images_to_generate]
|
| 222 |
|
| 223 |
run_image_gen_btn.click(
|