Rama-Alyoubi commited on
Commit
a1b791f
·
verified ·
1 Parent(s): dfad8a1

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -10,8 +10,10 @@ import torch
10
 
11
  # Get Hugging Face token from environment variable
12
  hf_token = os.getenv("HF_API_KEY")
13
- if hf_token is None:
14
- st.error("API Key not found. Please set the HF_API_KEY secret in your Space.")
 
 
15
 
16
  # Set up Hugging Face login using the token from the environment
17
  login(hf_token)
 
10
 
11
  # Get Hugging Face token from environment variable
12
  hf_token = os.getenv("HF_API_KEY")
13
+ if not hf_token:
14
+ st.error("Hugging Face API key not found. Please set it as an environment variable.")
15
+ else:
16
+ print("HF_API_KEY:", hf_token)
17
 
18
  # Set up Hugging Face login using the token from the environment
19
  login(hf_token)