gufett0 commited on
Commit
0875680
·
1 Parent(s): d6b1dd7
Files changed (1) hide show
  1. backend.py +5 -1
backend.py CHANGED
@@ -56,6 +56,10 @@ accurately as possible based on the instructions and context provided.
56
 
57
  load_dotenv()
58
 
 
 
 
 
59
  llm = HuggingFaceLLM(
60
  context_window=4096,
61
  max_new_tokens=256,
@@ -81,7 +85,7 @@ documents = SimpleDirectoryReader('./data').load_data()
81
 
82
  nodes = SentenceSplitter(chunk_size=512, chunk_overlap=20, paragraph_separator="\n\n").get_nodes_from_documents(documents)
83
  # Build the vector store index from the nodes
84
- index = VectorStoreIndex(nodes)
85
 
86
 
87
 
 
56
 
57
  load_dotenv()
58
 
59
+
60
+ os.environ['TOKENIZERS_PARALLELISM'] = 'false'
61
+
62
+
63
  llm = HuggingFaceLLM(
64
  context_window=4096,
65
  max_new_tokens=256,
 
85
 
86
  nodes = SentenceSplitter(chunk_size=512, chunk_overlap=20, paragraph_separator="\n\n").get_nodes_from_documents(documents)
87
  # Build the vector store index from the nodes
88
+ index = VectorStoreIndex(nodes, show_progress = True)
89
 
90
 
91