Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,6 +8,7 @@ hf_token = os.environ.get("hf_token")
|
|
| 8 |
API_URL_KVI = "https://api-inference.huggingface.co/models/Kvikontent/kviimager2.0"
|
| 9 |
API_URL_MJ = "https://api-inference.huggingface.co/models/Kvikontent/midjourney-v6"
|
| 10 |
API_URL_DALLE = "https://api-inference.huggingface.co/models/ehristoforu/dalle-3-xl"
|
|
|
|
| 11 |
|
| 12 |
def query(payload):
|
| 13 |
response = requests.post(API_URL, headers=headers, json=payload)
|
|
|
|
| 8 |
API_URL_KVI = "https://api-inference.huggingface.co/models/Kvikontent/kviimager2.0"
|
| 9 |
API_URL_MJ = "https://api-inference.huggingface.co/models/Kvikontent/midjourney-v6"
|
| 10 |
API_URL_DALLE = "https://api-inference.huggingface.co/models/ehristoforu/dalle-3-xl"
|
| 11 |
+
headers = {"Authorization": f"Bearer {hf_token}"}
|
| 12 |
|
| 13 |
def query(payload):
|
| 14 |
response = requests.post(API_URL, headers=headers, json=payload)
|