Spaces:
Running
on
Zero
Running
on
Zero
artificialguybr
commited on
Commit
•
fa52e75
1
Parent(s):
000d4f5
Update app.py
Browse files
app.py
CHANGED
@@ -29,26 +29,24 @@ def run_lora(prompt, weight):
|
|
29 |
print("Query function executed successfully.")
|
30 |
return Image.open(image_bytes)
|
31 |
|
32 |
-
# Gradio UI
|
33 |
print("Before Gradio Interface")
|
34 |
|
35 |
-
title = gr.HTML("
|
36 |
|
37 |
gallery = gr.Gallery(
|
38 |
-
|
39 |
label="LoRA Gallery",
|
40 |
allow_preview=False,
|
41 |
-
columns=3
|
42 |
-
id="gallery"
|
43 |
)
|
44 |
|
45 |
-
prompt = gr.Textbox(label="Prompt",
|
46 |
|
47 |
advanced_options = gr.Accordion("Advanced options", open=False)
|
48 |
|
49 |
weight = gr.Slider(0, 10, value=1, step=0.1, label="LoRA weight")
|
50 |
|
51 |
-
result = gr.Image(interactive=False, label="Generated Image"
|
52 |
|
53 |
gr.Interface(
|
54 |
fn=run_lora,
|
|
|
29 |
print("Query function executed successfully.")
|
30 |
return Image.open(image_bytes)
|
31 |
|
|
|
32 |
print("Before Gradio Interface")
|
33 |
|
34 |
+
title = gr.HTML("<h1>LoRA the Explorer</h1>")
|
35 |
|
36 |
gallery = gr.Gallery(
|
37 |
+
[(item["image"], item["title"]) for item in loras],
|
38 |
label="LoRA Gallery",
|
39 |
allow_preview=False,
|
40 |
+
columns=3
|
|
|
41 |
)
|
42 |
|
43 |
+
prompt = gr.Textbox(label="Prompt", lines=1, max_lines=1, placeholder="Type a prompt after selecting a LoRA")
|
44 |
|
45 |
advanced_options = gr.Accordion("Advanced options", open=False)
|
46 |
|
47 |
weight = gr.Slider(0, 10, value=1, step=0.1, label="LoRA weight")
|
48 |
|
49 |
+
result = gr.Image(interactive=False, label="Generated Image")
|
50 |
|
51 |
gr.Interface(
|
52 |
fn=run_lora,
|