Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import requests
|
|
5 |
import io
|
6 |
from PIL import Image
|
7 |
API_URL = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-dev"
|
8 |
-
headers = {"Authorization": "Bearer " + os.getenv("
|
9 |
def infer(prompt):
|
10 |
def query(payload):
|
11 |
response = requests.post(API_URL, headers=headers, json=payload)
|
|
|
5 |
import io
|
6 |
from PIL import Image
|
7 |
API_URL = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-dev"
|
8 |
+
headers = {"Authorization": "Bearer " + os.getenv("HUGGINGFACE_API_TOKEN")}
|
9 |
def infer(prompt):
|
10 |
def query(payload):
|
11 |
response = requests.post(API_URL, headers=headers, json=payload)
|