soiz commited on
Commit
2f90d6f
·
verified ·
1 Parent(s): 706256b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -70,8 +70,8 @@ index_html = """
70
  <title>FLUX.1-Dev Image Generator</title>
71
  <script>
72
  async function generateImage() {
73
- const prompt = document.getElementById("prompt").value + ", high image quality, high quality";
74
- const negative_prompt = document.getElementById("negative_prompt").value + ", dirty, achromatic, gray, distorted, anatomically bad, deformed head, impossible deformity, crooked face";
75
  const width = document.getElementById("width").value;
76
  const height = document.getElementById("height").value;
77
  const steps = document.getElementById("steps").value;
@@ -122,16 +122,18 @@ index_html = """
122
  <h1>FLUX.1-Dev Image Generator</h1>
123
  <form onsubmit="event.preventDefault(); generateImage();">
124
  <label for="prompt">Prompt:</label>
125
- <textarea id="prompt" name="prompt" placeholder="Enter your prompt" required>real, sky, blue, clouds, light blue, light blue sky, sun, 32K, many islands floating in the sky, Ghibli, many islands, many islands in the sky, islands in the clouds, old islands, fog, high quality, cool, real</textarea><br><br>
126
 
127
  <label for="negative_prompt">Negative Prompt:</label>
128
- <textarea id="negative_prompt" name="negative_prompt" >(deformed, distorted, disfigured), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation, misspellings, typos</textarea><br><br>
129
 
130
  <label for="width">Width:</label>
131
- <input type="number" id="width" name="width" value="1024"><br><br>
 
132
 
133
  <label for="height">Height:</label>
134
- <input type="number" id="height" name="height" value="1024"><br><br>
 
135
 
136
  <label for="steps">Sampling Steps:</label>
137
  <input type="number" id="steps" name="steps" value="35"><br><br>
@@ -161,7 +163,6 @@ index_html = """
161
  <img id="generated-image" src="" alt="Generated Image" style="max-width: 100%; height: auto; display: none;">
162
  </body>
163
  </html>
164
-
165
  """
166
 
167
  @app.route('/')
 
70
  <title>FLUX.1-Dev Image Generator</title>
71
  <script>
72
  async function generateImage() {
73
+ const prompt = document.getElementById("prompt").value;
74
+ const negative_prompt = document.getElementById("negative_prompt").value;
75
  const width = document.getElementById("width").value;
76
  const height = document.getElementById("height").value;
77
  const steps = document.getElementById("steps").value;
 
122
  <h1>FLUX.1-Dev Image Generator</h1>
123
  <form onsubmit="event.preventDefault(); generateImage();">
124
  <label for="prompt">Prompt:</label>
125
+ <input type="text" id="prompt" name="prompt" placeholder="Enter your prompt" required><br><br>
126
 
127
  <label for="negative_prompt">Negative Prompt:</label>
128
+ <input type="text" id="negative_prompt" name="negative_prompt" value="(deformed, distorted, disfigured), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation, misspellings, typos"><br><br>
129
 
130
  <label for="width">Width:</label>
131
+ <input type="range" id="width" name="width" min="64" max="2048" value="1024" step="8" oninput="this.nextElementSibling.value = this.value">
132
+ <output>1024</output><br><br>
133
 
134
  <label for="height">Height:</label>
135
+ <input type="range" id="height" name="height" min="64" max="2048" value="1024" step="8" oninput="this.nextElementSibling.value = this.value">
136
+ <output>1024</output><br><br>
137
 
138
  <label for="steps">Sampling Steps:</label>
139
  <input type="number" id="steps" name="steps" value="35"><br><br>
 
163
  <img id="generated-image" src="" alt="Generated Image" style="max-width: 100%; height: auto; display: none;">
164
  </body>
165
  </html>
 
166
  """
167
 
168
  @app.route('/')