Update app.py
Browse files
app.py
CHANGED
|
@@ -10,10 +10,11 @@ from langchain.chains import ConversationalRetrievalChain
|
|
| 10 |
from htmlTemplates import css, bot_template, user_template
|
| 11 |
from langchain.llms import HuggingFaceHub
|
| 12 |
import os
|
|
|
|
| 13 |
|
| 14 |
# Retrieve the Hugging Face token from environment variables
|
| 15 |
token = os.getenv("HUGGINGFACEHUB_TOKEN")
|
| 16 |
-
|
| 17 |
def get_pdf_text(pdf_docs):
|
| 18 |
text = ""
|
| 19 |
for pdf in pdf_docs:
|
|
|
|
| 10 |
from htmlTemplates import css, bot_template, user_template
|
| 11 |
from langchain.llms import HuggingFaceHub
|
| 12 |
import os
|
| 13 |
+
from huggingface_hub import login
|
| 14 |
|
| 15 |
# Retrieve the Hugging Face token from environment variables
|
| 16 |
token = os.getenv("HUGGINGFACEHUB_TOKEN")
|
| 17 |
+
login()
|
| 18 |
def get_pdf_text(pdf_docs):
|
| 19 |
text = ""
|
| 20 |
for pdf in pdf_docs:
|