Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -3,9 +3,10 @@ import requests
|
|
3 |
from PIL import Image
|
4 |
import io
|
5 |
import PIL
|
|
|
6 |
|
7 |
API_URL = "https://api-inference.huggingface.co/models/Linaqruf/animagine-xl"
|
8 |
-
headers =
|
9 |
|
10 |
def generate_image(prompt):
|
11 |
response = requests.post(API_URL, headers=headers, json={"inputs": prompt})
|
|
|
3 |
from PIL import Image
|
4 |
import io
|
5 |
import PIL
|
6 |
+
import os
|
7 |
|
8 |
API_URL = "https://api-inference.huggingface.co/models/Linaqruf/animagine-xl"
|
9 |
+
headers = os.getenv("SEECRET_TOKEN")
|
10 |
|
11 |
def generate_image(prompt):
|
12 |
response = requests.post(API_URL, headers=headers, json={"inputs": prompt})
|