Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,16 @@ from langchain_core.prompts import ChatPromptTemplate
|
|
6 |
from langchain_core.runnables import RunnablePassthrough
|
7 |
from langchain_groq import ChatGroq
|
8 |
from langchain_community.embeddings import OpenAIEmbeddings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
|
11 |
|
|
|
6 |
from langchain_core.runnables import RunnablePassthrough
|
7 |
from langchain_groq import ChatGroq
|
8 |
from langchain_community.embeddings import OpenAIEmbeddings
|
9 |
+
import logging
|
10 |
+
from huggingface_hub import login
|
11 |
+
|
12 |
+
hf_token = os.getenv("HF_TOKEN")
|
13 |
+
if hf_token is None:
|
14 |
+
print("Please set your Hugging Face token in the environment variables.")
|
15 |
+
else:
|
16 |
+
login(token=hf_token)
|
17 |
+
|
18 |
+
logging.basicConfig(level=logging.DEBUG)
|
19 |
|
20 |
|
21 |
|