Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ from transformers import pipeline # Hugging Face pipeline for using T5 model
|
|
10 |
|
11 |
|
12 |
# Access Hugging Face API token from Streamlit secrets
|
13 |
-
|
14 |
|
15 |
# Function to get text from the PDF documents
|
16 |
def get_pdf_text(pdf_docs):
|
@@ -48,7 +48,7 @@ def get_conversation_chain(vectorstore):
|
|
48 |
"text2text-generation",
|
49 |
model="t5-small", # Smaller model for low-end systems
|
50 |
tokenizer="t5-small",
|
51 |
-
|
52 |
)
|
53 |
|
54 |
llm = HuggingFacePipeline(pipeline=t5_model)
|
|
|
10 |
|
11 |
|
12 |
# Access Hugging Face API token from Streamlit secrets
|
13 |
+
|
14 |
|
15 |
# Function to get text from the PDF documents
|
16 |
def get_pdf_text(pdf_docs):
|
|
|
48 |
"text2text-generation",
|
49 |
model="t5-small", # Smaller model for low-end systems
|
50 |
tokenizer="t5-small",
|
51 |
+
# Automatically fetches the token from Streamlit secrets
|
52 |
)
|
53 |
|
54 |
llm = HuggingFacePipeline(pipeline=t5_model)
|