Spaces:
Sleeping
Sleeping
Update ImageGenerator.py
Browse files- ImageGenerator.py +1 -1
ImageGenerator.py
CHANGED
|
@@ -26,7 +26,7 @@ def generate_image(prompt):
|
|
| 26 |
try:
|
| 27 |
api_url="https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5"
|
| 28 |
headers = {"Authorization": f"Bearer {HF_API_KEY}"}
|
| 29 |
-
response = requests.post(api_url, headers=headers, json={"inputs": prompt})
|
| 30 |
|
| 31 |
# Check if the response is OK
|
| 32 |
if response.status_code == 200:
|
|
|
|
| 26 |
try:
|
| 27 |
api_url="https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5"
|
| 28 |
headers = {"Authorization": f"Bearer {HF_API_KEY}"}
|
| 29 |
+
response = requests.post(api_url, headers=headers, json={"inputs": prompt.split('-')[-1]})
|
| 30 |
|
| 31 |
# Check if the response is OK
|
| 32 |
if response.status_code == 200:
|