alijaanai commited on
Commit
fb63425
·
verified ·
1 Parent(s): d9f6918

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -12,7 +12,7 @@ def load_pipeline():
12
  use_safetensors=True,
13
  variant="fp16"
14
  )
15
- pipe.to("cuda") # Change to "cpu" if no GPU available
16
  return pipe
17
 
18
  pipe = load_pipeline()
@@ -22,8 +22,8 @@ st.title("Stable Diffusion XL Prompt-to-Image Generator")
22
  st.write("Enter a prompt to generate an image using the Stable Diffusion XL model.")
23
 
24
  # User inputs
25
- user_prompt = st.text_input("Enter your prompt:", "cute cat sitting on the chair")
26
- negative_prompt = st.text_input("Enter a negative prompt (optional):", "ugly, blurry, poor quality")
27
 
28
  # Generate button
29
  if st.button("Generate Image"):
 
12
  use_safetensors=True,
13
  variant="fp16"
14
  )
15
+ pipe.to("cpu") # Change to "cpu" if no GPU available
16
  return pipe
17
 
18
  pipe = load_pipeline()
 
22
  st.write("Enter a prompt to generate an image using the Stable Diffusion XL model.")
23
 
24
  # User inputs
25
+ user_prompt = st.text_input("Enter your prompt:")
26
+ negative_prompt = st.text_input("Enter a negative prompt (ugly, blurry, poor quality):")
27
 
28
  # Generate button
29
  if st.button("Generate Image"):