ehristoforu commited on
Commit
ec8cf12
1 Parent(s): ee7ec84

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -9,12 +9,12 @@ API_URL = "https://api-inference.huggingface.co/models/ehristoforu/dalle-3-xl"
9
  API_TOKEN = os.getenv("HF_READ_TOKEN") # it is free
10
  headers = {"Authorization": f"Bearer {API_TOKEN}"}
11
 
12
- def query(prompt, is_negative=False, steps=1, cfg_scale=6, seed=None):
13
  payload = {
14
  "inputs": prompt,
15
- "is_negative": is_negative,
16
- "steps": steps,
17
- "cfg_scale": cfg_scale,
18
  "seed": seed if seed is not None else random.randint(-1, 2147483647)
19
  }
20
 
@@ -163,7 +163,7 @@ with gr.Blocks(css=css, theme="pseudolab/huggingface-korea-theme") as dalle:
163
  </h1>
164
  </div>
165
  <p style="margin-bottom: 10px; font-size: 94%; line-height: 23px;">
166
- This space demonstrates the work of the model <a style="text-decoration: underline;" href="https://huggingface.co/openskyml/dalle-3-xl">openskyml/dalle-3-xl</a>.
167
  </p>
168
  </div>
169
  """
 
9
  API_TOKEN = os.getenv("HF_READ_TOKEN") # it is free
10
  headers = {"Authorization": f"Bearer {API_TOKEN}"}
11
 
12
+ def query(prompt, seed=None):
13
  payload = {
14
  "inputs": prompt,
15
+ "negative_prompt": "blurry, ugly, bad quality",
16
+ "num_inference_steps": 20,
17
+ "guidance_scale": 4.5,
18
  "seed": seed if seed is not None else random.randint(-1, 2147483647)
19
  }
20
 
 
163
  </h1>
164
  </div>
165
  <p style="margin-bottom: 10px; font-size: 94%; line-height: 23px;">
166
+ This space demonstrates the work of the model <a style="text-decoration: underline;" href="https://huggingface.co/ehristoforu/dalle-3-xl">ehristoforu/dalle-3-xl</a>.
167
  </p>
168
  </div>
169
  """