ritikaaA commited on
Commit
2b09ab4
·
verified ·
1 Parent(s): 1d49779

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -124,6 +124,8 @@ def preprocess_text(text, chunk_size=200, overlap=50):
124
  # print(len(cleaned_chunks))
125
  # return cleaned_chunks
126
 
 
 
127
  def create_embeddings(text_chunks):
128
  embeddings = model.encode(text_chunks, convert_to_tensor=True)
129
  if embeddings.ndim == 1:
 
124
  # print(len(cleaned_chunks))
125
  # return cleaned_chunks
126
 
127
+ model = SentenceTransformer('all-MiniLM-L6-v2')
128
+
129
  def create_embeddings(text_chunks):
130
  embeddings = model.encode(text_chunks, convert_to_tensor=True)
131
  if embeddings.ndim == 1: