Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,12 @@ from diffusers import DiffusionPipeline
|
|
2 |
import gradio as gr
|
3 |
model_id = "CompVis/ldm-text2im-large-256"
|
4 |
ldm = DiffusionPipeline.from_pretrained(model_id)
|
|
|
|
|
5 |
def generate_image(Prompt):
|
6 |
-
images = ldm([Prompt], num_inference_steps=50, eta=.3, guidance_scale=6)
|
7 |
-
return images.images[0]
|
|
|
|
|
8 |
interface = gr.Interface(fn = generate_image,inputs = "text",outputs = "image",title = "Mashdemy Demo Image Generator App", description = "Type in a text and click submit to generate an image:", examples = ["a clown reading a book", "a cat using a laptop", "An elephant on grass"])
|
9 |
interface.launch(share = True)
|
|
|
2 |
import gradio as gr
|
3 |
model_id = "CompVis/ldm-text2im-large-256"
|
4 |
ldm = DiffusionPipeline.from_pretrained(model_id)
|
5 |
+
|
6 |
+
|
7 |
def generate_image(Prompt):
|
8 |
+
images = ldm([Prompt], num_inference_steps=50, eta=.3, guidance_scale=6)
|
9 |
+
return images.images[0]
|
10 |
+
|
11 |
+
|
12 |
interface = gr.Interface(fn = generate_image,inputs = "text",outputs = "image",title = "Mashdemy Demo Image Generator App", description = "Type in a text and click submit to generate an image:", examples = ["a clown reading a book", "a cat using a laptop", "An elephant on grass"])
|
13 |
interface.launch(share = True)
|