James Peter Perrfone Jefferies
commited on
Commit
·
32b2b28
1
Parent(s):
f41c220
Create generate function
Browse files- app.py +6 -3
- requirements.txt +1 -0
app.py
CHANGED
@@ -1,7 +1,10 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
def
|
4 |
-
|
5 |
|
6 |
-
|
|
|
|
|
7 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
from diffusers import DiffusionPipeline
|
3 |
|
4 |
+
def generate(prompt, negative_prompt):
|
5 |
+
pipeline = DiffusionPipeline.from_pretrained("Lykon/DreamShaper")
|
6 |
|
7 |
+
return pipeline(prompt, negative_prompt).images[0]
|
8 |
+
|
9 |
+
iface = gr.Interface(fn=generate, inputs="text", outputs="image")
|
10 |
iface.launch()
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
diffusers
|