Spaces:
Sleeping
Sleeping
added _ to cleaned_chunks
Browse files
app.py
CHANGED
|
@@ -26,7 +26,7 @@ def preprocess_text(text):
|
|
| 26 |
# Split the cleaned_text by every newline character (\n)
|
| 27 |
chunks = cleaned_text.split("\n")
|
| 28 |
|
| 29 |
-
# Create an empty list to store
|
| 30 |
cleaned_chunks = []
|
| 31 |
|
| 32 |
# Write your for-in loop below to clean each chunk and add it to the cleaned_chunks list
|
|
@@ -108,7 +108,7 @@ def get_top_chunks(query, chunk_embeddings, text_chunks):
|
|
| 108 |
|
| 109 |
#STEP 6 FROM SEMANTIC SEARCH
|
| 110 |
# Call the get_top_chunks function with the original query
|
| 111 |
-
top_results = get_top_chunks("How does water get into the sky?", chunk_embedings,
|
| 112 |
|
| 113 |
# Print the top results
|
| 114 |
print(top_results)
|
|
|
|
| 26 |
# Split the cleaned_text by every newline character (\n)
|
| 27 |
chunks = cleaned_text.split("\n")
|
| 28 |
|
| 29 |
+
# Create an empty list to store cleaned_chunks
|
| 30 |
cleaned_chunks = []
|
| 31 |
|
| 32 |
# Write your for-in loop below to clean each chunk and add it to the cleaned_chunks list
|
|
|
|
| 108 |
|
| 109 |
#STEP 6 FROM SEMANTIC SEARCH
|
| 110 |
# Call the get_top_chunks function with the original query
|
| 111 |
+
top_results = get_top_chunks("How does water get into the sky?", chunk_embedings, cleaned_chunks) # Complete this line
|
| 112 |
|
| 113 |
# Print the top results
|
| 114 |
print(top_results)
|