Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,14 @@
|
|
|
|
1 |
from diffusers import DDPMPipeline
|
|
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
image
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
from diffusers import DDPMPipeline
|
3 |
+
import PIL
|
4 |
|
5 |
+
def generate_image():
|
6 |
+
pipeline = DDPMPipeline.from_pretrained('dvoils/sd-class-butterflies-32')
|
7 |
+
image = pipeline().images[0]
|
8 |
+
return image
|
9 |
+
|
10 |
+
st.title('DDPMPipeline Image Generator')
|
11 |
+
|
12 |
+
if st.button('Generate Image'):
|
13 |
+
image = generate_image()
|
14 |
+
st.image(image, caption='Generated Image', use_column_width=True)
|