Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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:
|