ehristoforu
commited on
Commit
•
ec8cf12
1
Parent(s):
ee7ec84
Update app.py
Browse files
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,
|
13 |
payload = {
|
14 |
"inputs": prompt,
|
15 |
-
"
|
16 |
-
"
|
17 |
-
"
|
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/
|
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 |
"""
|