Spaces:
Running
Running
Rama-Alyoubi
commited on
Upload app.py
Browse files
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
|
14 |
-
st.error("API
|
|
|
|
|
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)
|