James Peter Perrfone Jefferies
commited on
Commit
·
86cdd5d
1
Parent(s):
b0fc705
Add labels to inputs
Browse files
app.py
CHANGED
@@ -5,11 +5,17 @@ from diffusers import DiffusionPipeline
|
|
5 |
def generate(prompt, negative_prompt):
|
6 |
pipeline = DiffusionPipeline.from_pretrained("Lykon/DreamShaper")
|
7 |
|
8 |
-
return pipeline(
|
|
|
|
|
|
|
9 |
|
10 |
iface = gr.Interface(
|
11 |
fn=generate,
|
12 |
-
inputs=[
|
|
|
|
|
|
|
13 |
outputs="image",
|
14 |
)
|
15 |
|
|
|
5 |
def generate(prompt, negative_prompt):
|
6 |
pipeline = DiffusionPipeline.from_pretrained("Lykon/DreamShaper")
|
7 |
|
8 |
+
return pipeline(
|
9 |
+
prompt=prompt,
|
10 |
+
negative_prompt=negative_prompt,
|
11 |
+
).images[0]
|
12 |
|
13 |
iface = gr.Interface(
|
14 |
fn=generate,
|
15 |
+
inputs=[
|
16 |
+
gr.Textbox(label="Prompt", value=""),
|
17 |
+
gr.Textbox(label="Negative Prompt", value=""),
|
18 |
+
],
|
19 |
outputs="image",
|
20 |
)
|
21 |
|