DingoBeast commited on
Commit
11370de
·
verified ·
1 Parent(s): 2484b4f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -17,7 +17,7 @@ def load_sentiment_analyzer():
17
  # Load text-to-image model
18
  @st.cache_resource
19
  def load_text2img():
20
- model = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype=torch_dtype)
21
  model = model.to(device)
22
  return model
23
 
@@ -69,7 +69,7 @@ def generate_prompt(emotions):
69
  return "Create a multi-style artwork combining " + ", ".join(prompt_parts)
70
 
71
  def generate_image(prompt):
72
- image = text2img(prompt, num_inference_steps=10).images[0]
73
  return image
74
 
75
  def main():
 
17
  # Load text-to-image model
18
  @st.cache_resource
19
  def load_text2img():
20
+ model = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype=torch_dtype, safety_checker = None, requires_safety_checker = False)
21
  model = model.to(device)
22
  return model
23
 
 
69
  return "Create a multi-style artwork combining " + ", ".join(prompt_parts)
70
 
71
  def generate_image(prompt):
72
+ image = text2img(prompt, num_inference_steps=5).images[0]
73
  return image
74
 
75
  def main():