Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,6 +49,13 @@ def generate_image(image, prompt, guidance_scale, num_steps, lora_name):
|
|
| 49 |
|
| 50 |
return final_image
|
| 51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
# Create Gradio interface with sliders for numeric inputs
|
| 53 |
iface = gr.Interface(
|
| 54 |
fn=generate_image,
|
|
@@ -67,7 +74,8 @@ iface = gr.Interface(
|
|
| 67 |
)
|
| 68 |
],
|
| 69 |
outputs=gr.Image(label="Output Image", type="pil"),
|
| 70 |
-
title="FLUX Image Generation with LoRA"
|
|
|
|
| 71 |
)
|
| 72 |
|
| 73 |
if __name__ == "__main__":
|
|
|
|
| 49 |
|
| 50 |
return final_image
|
| 51 |
|
| 52 |
+
# Define examples to be shown within the Gradio interface
|
| 53 |
+
examples = [
|
| 54 |
+
# Each example is a list corresponding to the inputs:
|
| 55 |
+
# [Input Image, Prompt, Guidance Scale, Number of Steps, LoRA Name]
|
| 56 |
+
["assets/1.png", "add a halo and wings for the cat by sksmagiceffects", 3.5, 20, "sksmagiceffects"]
|
| 57 |
+
]
|
| 58 |
+
|
| 59 |
# Create Gradio interface with sliders for numeric inputs
|
| 60 |
iface = gr.Interface(
|
| 61 |
fn=generate_image,
|
|
|
|
| 74 |
)
|
| 75 |
],
|
| 76 |
outputs=gr.Image(label="Output Image", type="pil"),
|
| 77 |
+
title="FLUX Image Generation with LoRA",
|
| 78 |
+
examples=examples
|
| 79 |
)
|
| 80 |
|
| 81 |
if __name__ == "__main__":
|