James Peter Perrfone Jefferies
commited on
Commit
·
b0fc705
1
Parent(s):
4a9c831
Add accelerate dependency
Browse files- app.py +7 -2
- requirements.txt +2 -1
app.py
CHANGED
@@ -7,5 +7,10 @@ def generate(prompt, negative_prompt):
|
|
7 |
|
8 |
return pipeline(prompt, negative_prompt).images[0]
|
9 |
|
10 |
-
iface = gr.Interface(
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
return pipeline(prompt, negative_prompt).images[0]
|
9 |
|
10 |
+
iface = gr.Interface(
|
11 |
+
fn=generate,
|
12 |
+
inputs=["text", "text"],
|
13 |
+
outputs="image",
|
14 |
+
)
|
15 |
+
|
16 |
+
iface.launch()
|
requirements.txt
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
diffusers
|
2 |
torch
|
3 |
-
transformers
|
|
|
1 |
+
accelerate
|
2 |
diffusers
|
3 |
torch
|
4 |
+
transformers
|