softwareweaver commited on
Commit
85f385f
·
verified ·
1 Parent(s): f84d1c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -9,6 +9,11 @@ import torch
9
 
10
  model_repo_id = "Qwen/Qwen-Image"
11
  hf_token = os.getenv("HF_TOKEN_SPACES")
 
 
 
 
 
12
 
13
  MODEL_CHOICES = [
14
  "black-forest-labs/FLUX.1-dev",
 
9
 
10
  model_repo_id = "Qwen/Qwen-Image"
11
  hf_token = os.getenv("HF_TOKEN_SPACES")
12
+ if HF_TOKEN is None:
13
+ raise RuntimeError(
14
+ "HF_TOKEN is not set in the environment. "
15
+ "Add it in the Space settings (Variables & secrets)."
16
+ )
17
 
18
  MODEL_CHOICES = [
19
  "black-forest-labs/FLUX.1-dev",