acecalisto3 commited on
Commit
e70d99e
·
verified ·
1 Parent(s): fc660d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -27,9 +27,9 @@ constraints = (
27
  def generate_image(prompt):
28
  print("Generating image with prompt:", prompt)
29
  api_url = f"https://api-inference.huggingface.co/models/{repo}"
30
- token = os.getenv("API_TOKEN") # Fetch from environment
31
  if not token:
32
- raise ValueError("API_TOKEN environment variable is not set.")
33
  headers = {
34
  "Authorization": f"Bearer {token}"
35
  }
 
27
  def generate_image(prompt):
28
  print("Generating image with prompt:", prompt)
29
  api_url = f"https://api-inference.huggingface.co/models/{repo}"
30
+ token = os.getenv("HF_TOKEN") # Fetch from environment
31
  if not token:
32
+ raise ValueError("HF_TOKEN environment variable is not set.")
33
  headers = {
34
  "Authorization": f"Bearer {token}"
35
  }