Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,15 +13,26 @@ key = os.getenv("KEY")
|
|
13 |
def render(prompt, negative_prompt, output_format, output_size, style, lighting, background, camera_position, camera_angle):
|
14 |
headers = {"Authorization": f"Bearer {key}"}
|
15 |
data = {
|
16 |
-
"
|
17 |
-
"
|
18 |
-
"
|
19 |
-
"
|
20 |
-
"
|
21 |
-
"
|
22 |
-
"
|
23 |
-
"
|
24 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
}
|
26 |
response = requests.post(url, headers=headers, json=data)
|
27 |
if response.status_code == 200:
|
|
|
13 |
def render(prompt, negative_prompt, output_format, output_size, style, lighting, background, camera_position, camera_angle):
|
14 |
headers = {"Authorization": f"Bearer {key}"}
|
15 |
data = {
|
16 |
+
"key": "your_api_key",
|
17 |
+
"model_id": "realistic-vision-51",
|
18 |
+
"prompt": prompt,
|
19 |
+
"negative_prompt": negative_prompt,
|
20 |
+
"width": "512",
|
21 |
+
"height": "512",
|
22 |
+
"samples": "1",
|
23 |
+
"num_inference_steps": "30",
|
24 |
+
"safety_checker": "no",
|
25 |
+
"enhance_prompt": "yes",
|
26 |
+
"seed": None,
|
27 |
+
"guidance_scale": 7.5,
|
28 |
+
"multi_lingual": "no",
|
29 |
+
"panorama": "no",
|
30 |
+
"self_attention": "no",
|
31 |
+
"upscale": "no",
|
32 |
+
"embeddings": "embeddings_model_id",
|
33 |
+
"lora": "lora_model_id",
|
34 |
+
"webhook": None,
|
35 |
+
"track_id": None,
|
36 |
}
|
37 |
response = requests.post(url, headers=headers, json=data)
|
38 |
if response.status_code == 200:
|