dvoils commited on
Commit
52b8849
1 Parent(s): 8587451

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -1,5 +1,14 @@
 
1
  from diffusers import DDPMPipeline
 
2
 
3
- pipeline = DDPMPipeline.from_pretrained('dvoils/sd-class-butterflies-32')
4
- image = pipeline().images[0]
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)