Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -51,7 +51,11 @@ HF_TOKEN=API_TOKEN# token where you deployed your endpoint
|
|
| 51 |
|
| 52 |
def generate_image(prompt_SD:str):
|
| 53 |
print(prompt_SD)
|
| 54 |
-
payload = {"inputs": prompt_SD,"seed":random.randint(0,100)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
headers = {
|
| 56 |
"Authorization": f"Bearer {HF_TOKEN}",
|
| 57 |
"Content-Type": "application/json",
|
|
|
|
| 51 |
|
| 52 |
def generate_image(prompt_SD:str):
|
| 53 |
print(prompt_SD)
|
| 54 |
+
payload = {"inputs": prompt_SD,"seed":random.randint(0,100),"parameters": {
|
| 55 |
+
"width": 768,
|
| 56 |
+
"height": 768,
|
| 57 |
+
"negative_prompt":"low quality"
|
| 58 |
+
}}
|
| 59 |
headers = {
|
| 60 |
"Authorization": f"Bearer {HF_TOKEN}",
|
| 61 |
"Content-Type": "application/json",
|