Update app.py
Browse files
app.py
CHANGED
@@ -7,11 +7,11 @@ import os
|
|
7 |
|
8 |
# Authenticate with Hugging Face
|
9 |
def authenticate_huggingface():
|
10 |
-
token = os.getenv("
|
11 |
if token:
|
12 |
login(token) # This logs in using the Hugging Face token
|
13 |
else:
|
14 |
-
st.error("Hugging Face token not found. Please set the
|
15 |
|
16 |
# Load the Llama 2 model from Hugging Face
|
17 |
@st.cache_resource
|
|
|
7 |
|
8 |
# Authenticate with Hugging Face
|
9 |
def authenticate_huggingface():
|
10 |
+
token = os.getenv("HUGGINGFACEHUB_API_TOKEN") # Load token from environment variable
|
11 |
if token:
|
12 |
login(token) # This logs in using the Hugging Face token
|
13 |
else:
|
14 |
+
st.error("Hugging Face token not found. Please set the HUGGINGFACEHUB_API_TOKEN environment variable.")
|
15 |
|
16 |
# Load the Llama 2 model from Hugging Face
|
17 |
@st.cache_resource
|