Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,15 @@
|
|
1 |
import streamlit as st
|
2 |
from PIL import Image
|
|
|
|
|
3 |
|
4 |
st.title(" New App")
|
5 |
|
6 |
area = st.text_area("Area",'')
|
7 |
|
|
|
|
|
|
|
8 |
if len(area) > 5:
|
9 |
image = pipe(area).images[0]
|
10 |
im = Image.open(image)
|
|
|
1 |
import streamlit as st
|
2 |
from PIL import Image
|
3 |
+
import torch
|
4 |
+
from diffusers import StableDiffusionPipeline
|
5 |
|
6 |
st.title(" New App")
|
7 |
|
8 |
area = st.text_area("Area",'')
|
9 |
|
10 |
+
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16)
|
11 |
+
|
12 |
+
|
13 |
if len(area) > 5:
|
14 |
image = pipe(area).images[0]
|
15 |
im = Image.open(image)
|