Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ with open("uni_dataset.txt", "r", encoding="utf-8") as file:
|
|
| 12 |
# Print the text below
|
| 13 |
print("success")
|
| 14 |
|
| 15 |
-
chunks = [chunk.strip() for chunk in
|
| 16 |
embedder = SentenceTransformer('all-MiniLM-L6-v2')
|
| 17 |
chunk_embeddings = embedder.encode(chunks, convert_to_tensor= True)
|
| 18 |
|
|
|
|
| 12 |
# Print the text below
|
| 13 |
print("success")
|
| 14 |
|
| 15 |
+
chunks = [chunk.strip() for chunk in uni_dataset_text.split("\n\n") if chunk.strip()]
|
| 16 |
embedder = SentenceTransformer('all-MiniLM-L6-v2')
|
| 17 |
chunk_embeddings = embedder.encode(chunks, convert_to_tensor= True)
|
| 18 |
|