DeMaking commited on
Commit
93688d0
·
verified ·
1 Parent(s): 30e8b0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -31,7 +31,12 @@ HF_HUB_TOKEN = os.getenv("HUGGINGFACEHUB_API_TOKEN")
31
  if not HF_HUB_TOKEN:
32
  raise ValueError("Missing Hugging Face API token. Please set HUGGINGFACEHUB_API_TOKEN.")
33
 
34
- print(f"HUGGINGFACEHUB_API_TOKEN: {HUGGINGFACEHUB_API_TOKEN}")
 
 
 
 
 
35
  print(f"HF_HUB_TOKEN: {HF_HUB_TOKEN}")
36
 
37
  # Login and initialize the InferenceClient
 
31
  if not HF_HUB_TOKEN:
32
  raise ValueError("Missing Hugging Face API token. Please set HUGGINGFACEHUB_API_TOKEN.")
33
 
34
+ # Get Hugging Face API token from environment variable
35
+ HF_SERVERLESS_API_TOKEN = os.getenv("HF_TOKEN_SERVERLESS_API")
36
+ if not HF_SERVERLESS_API_TOKEN:
37
+ raise ValueError("Missing HF SERVERLESS API token. Please set HF_TOKEN_SERVERLESS_API.")
38
+
39
+ print(f"HF_TOKEN_SERVERLESS_API: {HF_SERVERLESS_API_TOKEN}")
40
  print(f"HF_HUB_TOKEN: {HF_HUB_TOKEN}")
41
 
42
  # Login and initialize the InferenceClient