Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,14 +13,14 @@ load_dotenv()
|
|
13 |
nltk.download('punkt')
|
14 |
|
15 |
# Retrieve Hugging Face API key from environment variable
|
16 |
-
HF_API_KEY = os.getenv('
|
17 |
|
18 |
if not HF_API_KEY:
|
19 |
raise ValueError("Please set the 'HUGGINGFACE_API_KEY' environment variable.")
|
20 |
|
21 |
# Initialize Hugging Face Inference API with a suitable image generation model
|
22 |
# You can choose a different model if preferred
|
23 |
-
MODEL_NAME = "
|
24 |
inference = InferenceApi(repo_id=MODEL_NAME, token=HF_API_KEY)
|
25 |
|
26 |
def generate_comic_images(story):
|
|
|
13 |
nltk.download('punkt')
|
14 |
|
15 |
# Retrieve Hugging Face API key from environment variable
|
16 |
+
HF_API_KEY = os.getenv('onteddu')
|
17 |
|
18 |
if not HF_API_KEY:
|
19 |
raise ValueError("Please set the 'HUGGINGFACE_API_KEY' environment variable.")
|
20 |
|
21 |
# Initialize Hugging Face Inference API with a suitable image generation model
|
22 |
# You can choose a different model if preferred
|
23 |
+
MODEL_NAME = "black-forest-labs/FLUX.1-schnell"
|
24 |
inference = InferenceApi(repo_id=MODEL_NAME, token=HF_API_KEY)
|
25 |
|
26 |
def generate_comic_images(story):
|