Geek7 commited on
Commit
5b494c3
·
verified ·
1 Parent(s): bc307a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -26,12 +26,12 @@ def is_prompt_explicit(prompt):
26
  return False
27
 
28
  # Function to generate an image from a text prompt
29
- def generate_image(prompt, negative_prompt, height=512, width=512, model="stabilityai/stable-diffusion-2-1", num_inference_steps=50, guidance_scale=7.5, seed=None):
30
  try:
31
  # Generate the image using Hugging Face's inference API with additional parameters
32
  image = client.text_to_image(
33
  prompt=prompt,
34
- negative_prompt="extra fingers, elongated fingers, deformed body, poorly drawn face, bad anatomy, missing limbs",
35
  height=height,
36
  width=width,
37
  model=model,
 
26
  return False
27
 
28
  # Function to generate an image from a text prompt
29
+ def generate_image(prompt, negative_prompt=None, height=512, width=512, model="stabilityai/stable-diffusion-2-1", num_inference_steps=50, guidance_scale=7.5, seed=None):
30
  try:
31
  # Generate the image using Hugging Face's inference API with additional parameters
32
  image = client.text_to_image(
33
  prompt=prompt,
34
+ negative_prompt=negative_prompt,
35
  height=height,
36
  width=width,
37
  model=model,