Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,13 +9,11 @@ from PIL import Image
|
|
9 |
list_models = [
|
10 |
"PixelCraft"
|
11 |
]
|
12 |
-
|
13 |
# Function to generate images from text
|
14 |
def generate_txt2img(current_model, prompt, is_negative=False, image_style="None style", steps=50, cfg_scale=7, seed=None):
|
15 |
API_URL = "https://api-inference.huggingface.co/models/OEvortex/HelpingAI-PixelCraft"
|
16 |
-
|
17 |
-
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
18 |
-
|
19 |
base_payload = {
|
20 |
"inputs": prompt,
|
21 |
"is_negative": is_negative,
|
|
|
9 |
list_models = [
|
10 |
"PixelCraft"
|
11 |
]
|
12 |
+
HF_READ_TOKEN = os.getenv("HF_READ_TOKEN") # it is free #it is free https://huggingface.co/settings/tokens
|
13 |
# Function to generate images from text
|
14 |
def generate_txt2img(current_model, prompt, is_negative=False, image_style="None style", steps=50, cfg_scale=7, seed=None):
|
15 |
API_URL = "https://api-inference.huggingface.co/models/OEvortex/HelpingAI-PixelCraft"
|
16 |
+
headers = {"Authorization": f"Bearer {HF_READ_TOKEN}"}
|
|
|
|
|
17 |
base_payload = {
|
18 |
"inputs": prompt,
|
19 |
"is_negative": is_negative,
|