N1C1N1 commited on
Commit
f2cc1ba
1 Parent(s): 3f9195c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -3
app.py CHANGED
@@ -1,8 +1,22 @@
1
  import streamlit as st
2
- from transformers import pipeline
 
 
3
 
4
- pipe = pipeline("text-generation", model="stabilityai/stable-code-3b", trust_remote_code=True)
 
 
 
 
 
5
 
6
  field = st.text_area(label='Promt')
7
  if st.button('Generate', use_container_width=True):
8
- st.json(pipe(field))
 
 
 
 
 
 
 
 
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)