acecalisto3 commited on
Commit
6fb6aeb
·
verified ·
1 Parent(s): 43ebf25

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -13,6 +13,10 @@ from langchain_community.chains import ConversationChain
13
  from langchain_community.memory import ConversationBufferMemory
14
  from langchain_community.chains.question_answering import load_qa_chain
15
  from langchain_community.utils import CharacterTextSplitter
 
 
 
 
16
 
17
  # --- Constants ---
18
  MODEL_NAME = "google/flan-t5-xl" # Consider using a more powerful model like 'google/flan-t5-xl'
 
13
  from langchain_community.memory import ConversationBufferMemory
14
  from langchain_community.chains.question_answering import load_qa_chain
15
  from langchain_community.utils import CharacterTextSplitter
16
+ from transformers import BertTokenizerFast
17
+
18
+ # Download the DistilBERT tokenizer (~3 MB)
19
+ DistilBertTokenizerFast.from_pretrained('distilbert-base-uncased').save_pretrained('./cache/distilbert-base-uncased-local')
20
 
21
  # --- Constants ---
22
  MODEL_NAME = "google/flan-t5-xl" # Consider using a more powerful model like 'google/flan-t5-xl'