File size: 417 Bytes
64ea77f
2691f07
038d520
 
64ea77f
2691f07
64ea77f
 
 
038d520
 
 
80ce9f5
 
 
 
 
 
2691f07
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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.float16)


if len(area) > 5:
    image = pipe(area).images[0]
    im = Image.open(image)
    st.image(im)
else :
    st.text_input("No","No")