Update app.py
Browse files
app.py
CHANGED
|
@@ -7,8 +7,8 @@ import cv2 as cv
|
|
| 7 |
st.title("Txt2Img")
|
| 8 |
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", revision="fp16")
|
| 9 |
pipe.to("cpu")
|
| 10 |
-
|
| 11 |
-
if len(
|
| 12 |
-
image = pipe(
|
| 13 |
st.image(image)
|
| 14 |
|
|
|
|
| 7 |
st.title("Txt2Img")
|
| 8 |
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", revision="fp16")
|
| 9 |
pipe.to("cpu")
|
| 10 |
+
prom = st.text_area("Prompt",'')
|
| 11 |
+
if len(prom)>5:
|
| 12 |
+
image = pipe(prom).images[0]
|
| 13 |
st.image(image)
|
| 14 |
|