nigeljw commited on
Commit
45a989c
1 Parent(s): 88162b6

Added controls for inference

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -12,10 +12,12 @@ else:
12
 
13
  examplePrompt = "pbr brick wall"
14
  streamlit.title("Texel Space Interpolation")
15
- prompt = streamlit.text_input(label="Prompt", value=examplePrompt)
16
 
17
- image = pipe(prompt).images[0]
18
- image.save("bricks.png")
19
-
20
- #x = streamlit.slider('Select a value')
21
- #streamlit.write(x, 'squared is', x * x)
 
 
 
 
12
 
13
  examplePrompt = "pbr brick wall"
14
  streamlit.title("Texel Space Interpolation")
 
15
 
16
+ with streamlit.form(key="Interpolation"):
17
+ prompt = streamlit.text_input(label="Prompt", value=examplePrompt)
18
+ numSteps = streamlit.slider(label="Number of Inference steps", value=50, min_value=1, max_value=1000)
19
+ numImages = streamlit.slider(label="Number of Generated Images", value=1, min_value=1, max_value=10)
20
+ guidanceScale = streamlit.slider(label="Guidance Scale", value=7.5, min_value=0.0, max_value=100.0)
21
+ image = pipe(prompt, num_inference_steps=numSteps, num_images_per_prompt=numImages, guidance_scale=guidanceScale).images[0]
22
+ streamlit.form_submit_button("Interpolate")
23
+ synthesizedImage = streamlit.image(image)