Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,22 @@
|
|
1 |
import streamlit as st
|
2 |
-
|
|
|
|
|
3 |
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
field = st.text_area(label='Promt')
|
7 |
if st.button('Generate', use_container_width=True):
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
+
import torch
|
3 |
+
from diffusers import ShapEPipeline
|
4 |
+
from diffusers.utils import export_to_gif
|
5 |
|
6 |
+
|
7 |
+
ckpt_id = "openai/shap-e"
|
8 |
+
pipe = ShapEPipeline.from_pretrained(repo).to("cuda")
|
9 |
+
|
10 |
+
|
11 |
+
guidance_scale = 15.0
|
12 |
|
13 |
field = st.text_area(label='Promt')
|
14 |
if st.button('Generate', use_container_width=True):
|
15 |
+
images = pipe(
|
16 |
+
field,
|
17 |
+
guidance_scale=guidance_scale,
|
18 |
+
num_inference_steps=64,
|
19 |
+
size=256,
|
20 |
+
).images
|
21 |
+
for i in images:
|
22 |
+
st.image(i)
|