Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,9 +27,9 @@ constraints = (
|
|
27 |
def generate_image(prompt):
|
28 |
print("Generating image with prompt:", prompt)
|
29 |
api_url = f"https://api-inference.huggingface.co/models/{repo}"
|
30 |
-
|
31 |
headers = {
|
32 |
-
|
33 |
}
|
34 |
|
35 |
# Incorporate the hard set prompt and constraints
|
|
|
27 |
def generate_image(prompt):
|
28 |
print("Generating image with prompt:", prompt)
|
29 |
api_url = f"https://api-inference.huggingface.co/models/{repo}"
|
30 |
+
token = os.getenv("API_TOKEN")
|
31 |
headers = {
|
32 |
+
"Authorization": f"Bearer {token}"
|
33 |
}
|
34 |
|
35 |
# Incorporate the hard set prompt and constraints
|