Leteint commited on
Commit
7513002
·
verified ·
1 Parent(s): aff202d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -5,6 +5,17 @@ from diffusers import FluxPipeline
5
  from huggingface_hub import hf_hub_download
6
  import random
7
 
 
 
 
 
 
 
 
 
 
 
 
8
  # Chargement du modèle Flux.1-schnell
9
  model_id = "black-forest-labs/FLUX.1-schnell"
10
 
 
5
  from huggingface_hub import hf_hub_download
6
  import random
7
 
8
+ # Authentification HuggingFace
9
+ hf_token = os.getenv("HF_TOKEN")
10
+ if hf_token:
11
+ login(token=hf_token)
12
+ print("✅ Authentifié sur HuggingFace")
13
+ else:
14
+ print("⚠️ HF_TOKEN non trouvé - certains modèles peuvent être inaccessibles")
15
+
16
+
17
+
18
+
19
  # Chargement du modèle Flux.1-schnell
20
  model_id = "black-forest-labs/FLUX.1-schnell"
21