Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,8 @@ pipeline = None
|
|
7 |
# Load the pipeline and LoRA weights
|
8 |
def load_cust(modelsyu):
|
9 |
pipeline = DiffusionPipeline.from_pretrained(modelsyu)
|
10 |
-
|
|
|
11 |
|
12 |
def generate_image(prompt, negative_prompt):
|
13 |
global pipeline
|
@@ -26,7 +27,8 @@ with gr.Blocks() as demo:
|
|
26 |
with gr.Accordion('Load your custom models first'):
|
27 |
basem = gr.Textbox(label="Your Lora model")
|
28 |
exports = gr.Button("Load your models")
|
29 |
-
|
|
|
30 |
output_image = gr.Image(label="Generated Image")
|
31 |
submit_button.click(generate_image, inputs=[prompt, negative_prompt], outputs=output_image)
|
32 |
|
|
|
7 |
# Load the pipeline and LoRA weights
|
8 |
def load_cust(modelsyu):
|
9 |
pipeline = DiffusionPipeline.from_pretrained(modelsyu)
|
10 |
+
output_result = pipeline()
|
11 |
+
return output_result
|
12 |
|
13 |
def generate_image(prompt, negative_prompt):
|
14 |
global pipeline
|
|
|
27 |
with gr.Accordion('Load your custom models first'):
|
28 |
basem = gr.Textbox(label="Your Lora model")
|
29 |
exports = gr.Button("Load your models")
|
30 |
+
outputid = gr.Textbox(label="output", interactive=False)
|
31 |
+
exports.click(load_cust, inputs=[basem], outputs=[outputid])
|
32 |
output_image = gr.Image(label="Generated Image")
|
33 |
submit_button.click(generate_image, inputs=[prompt, negative_prompt], outputs=output_image)
|
34 |
|