bluenevus commited on
Commit
be085b4
·
verified ·
1 Parent(s): 04ad39b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -25,7 +25,7 @@ DEFAULT_NEGATIVE_PROMPT = """
25
  ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame,
26
  extra limbs, disfigured, deformed, body out of frame, bad anatomy, watermark, signature,
27
  cut off, low contrast, underexposed, overexposed, bad art, beginner, amateur, distorted face,
28
- plastic, cartoonish, artificial, fake, unnatural
29
  """
30
 
31
  app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])
@@ -59,7 +59,7 @@ app.layout = dbc.Container([
59
  value="1:1"
60
  ),
61
  dbc.Label("Steps"),
62
- dcc.Slider(id="steps", min=4, max=50, step=1, value=20, marks={4: '4', 25: '25', 50: '50'}),
63
  ],
64
  title="Advanced Settings",
65
  ),
@@ -125,7 +125,7 @@ def enhance_prompt(google_api_key, prompt, style):
125
  logging.error(f"Error in enhance_prompt: {str(e)}")
126
  raise
127
 
128
- def generate_image(stability_api_key, enhanced_prompt, style, negative_prompt, steps=30, aspect_ratio="1:1"):
129
  url = "https://api.stability.ai/v2beta/stable-image/generate/sd3"
130
 
131
  headers = {
@@ -134,7 +134,7 @@ def generate_image(stability_api_key, enhanced_prompt, style, negative_prompt, s
134
  }
135
 
136
  data = {
137
- "prompt": f"{enhanced_prompt}, Style: {style}, highly detailed, high quality, descriptive",
138
  "negative_prompt": negative_prompt,
139
  "model": "sd3.5-large-turbo",
140
  "output_format": "jpeg",
 
25
  ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame,
26
  extra limbs, disfigured, deformed, body out of frame, bad anatomy, watermark, signature,
27
  cut off, low contrast, underexposed, overexposed, bad art, beginner, amateur, distorted face,
28
+ plastic, cartoonish, artificial, fake, unnatural, blurry, smooth, lack of detail, low quality
29
  """
30
 
31
  app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])
 
59
  value="1:1"
60
  ),
61
  dbc.Label("Steps"),
62
+ dcc.Slider(id="steps", min=4, max=50, step=1, value=30, marks={4: '4', 25: '25', 50: '50'}),
63
  ],
64
  title="Advanced Settings",
65
  ),
 
125
  logging.error(f"Error in enhance_prompt: {str(e)}")
126
  raise
127
 
128
+ def generate_image(stability_api_key, enhanced_prompt, style, negative_prompt, steps, aspect_ratio):
129
  url = "https://api.stability.ai/v2beta/stable-image/generate/sd3"
130
 
131
  headers = {
 
134
  }
135
 
136
  data = {
137
+ "prompt": f"{enhanced_prompt}, Style: {style}, highly detailed, high quality, descriptive, sharp focus, intricate details",
138
  "negative_prompt": negative_prompt,
139
  "model": "sd3.5-large-turbo",
140
  "output_format": "jpeg",