BroBro87 commited on
Commit
20004c0
β€’
1 Parent(s): 2846543

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -32,7 +32,7 @@ def configure_llama_model():
32
  return llm
33
 
34
  def configure_embeddings():
35
- embed_model = HuggingFaceEmbeddings(model_name="all-MiniLM-L6-v2")
36
  return embed_model
37
 
38
 
@@ -47,8 +47,7 @@ def initialize_vector_store_index(data_path, service_context):
47
  loader = PyPDFLoader("./Cloudflare.pdf")
48
  pages = loader.load_and_split()
49
  # Load the index from a file
50
- with open('./index_file.pkl', 'rb') as f:
51
- index = pickle.load(f)
52
  #index = VectorStoreIndex.from_documents(documents, service_context=service_context)
53
  embeddings_2 = SentenceTransformerEmbeddings(model_name="all-MiniLM-L6-v2")
54
  documents = SimpleDirectoryReader("./").load_data()
 
32
  return llm
33
 
34
  def configure_embeddings():
35
+ embed_model = embed_model = LangchainEmbedding(HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-L6-v2'))
36
  return embed_model
37
 
38
 
 
47
  loader = PyPDFLoader("./Cloudflare.pdf")
48
  pages = loader.load_and_split()
49
  # Load the index from a file
50
+
 
51
  #index = VectorStoreIndex.from_documents(documents, service_context=service_context)
52
  embeddings_2 = SentenceTransformerEmbeddings(model_name="all-MiniLM-L6-v2")
53
  documents = SimpleDirectoryReader("./").load_data()