PebinAPJ commited on
Commit
0668a20
·
verified ·
1 Parent(s): a07fde7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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
- hf_token = st.secrets["huggingface"]["HF_TOKEN"]
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
- use_auth_token=hf_token # Automatically fetches the token from Streamlit secrets
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)