File size: 427 Bytes
64ea77f
2691f07
038d520
 
64ea77f
2691f07
64ea77f
 
 
160d299
038d520
 
80ce9f5
83dc71d
 
 
80ce9f5
2691f07
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import streamlit as st
from PIL import Image
import torch
from diffusers import StableDiffusionPipeline

st.title(" New App")

area = st.text_area("Area",'')

pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float32)


if len(area) > 5:
    image = pipe(area).images
    print(len(image),type(image),image.shape)
    im = Image.open(image[0])
    st.image(im)