nigeljw commited on
Commit
a73e75c
1 Parent(s): a97b1e4

Added basic sample and requirements

Browse files
Files changed (2) hide show
  1. app.py +16 -0
  2. requirements.txt +3 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from diffusers import StableDiffusionPipeline
3
+ import torch
4
+
5
+ model_id = "dream-textures/texture-diffusion"
6
+
7
+ pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
8
+ pipe = pipe.to("cuda")
9
+
10
+ prompt = "pbr brick wall"
11
+ image = pipe(prompt).images[0]
12
+
13
+ image.save("bricks.png")
14
+
15
+ x = st.slider('Select a value')
16
+ st.write(x, 'squared is', x * x)
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ torch
2
+ diffusers
3
+ streamlit