Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ if generator_tokenizer.pad_token is None:
|
|
21 |
generator_tokenizer.pad_token = generator_tokenizer.eos_token
|
22 |
|
23 |
# Hugging Face API for Image Generation
|
24 |
-
HF_API_KEY = "
|
25 |
IMAGE_GEN_URL = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-schnell"
|
26 |
# Get the API key from environment variables or Hugging Face secrets
|
27 |
HEADERS = {"Authorization": f"Bearer {HF_API_KEY}"}
|
|
|
21 |
generator_tokenizer.pad_token = generator_tokenizer.eos_token
|
22 |
|
23 |
# Hugging Face API for Image Generation
|
24 |
+
HF_API_KEY = os.getenv("HF_API_KEY") # Replace with your API key
|
25 |
IMAGE_GEN_URL = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-schnell"
|
26 |
# Get the API key from environment variables or Hugging Face secrets
|
27 |
HEADERS = {"Authorization": f"Bearer {HF_API_KEY}"}
|