Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,7 +61,7 @@ def create_embeddings(text_chunks):
|
|
| 61 |
return chunk_embeddings
|
| 62 |
|
| 63 |
# Call the create_embeddings function and store the result in a new chunk_embeddings variable
|
| 64 |
-
chunk_embeddings = create_embeddings(cleaned_chunks) # Complete this line
|
| 65 |
|
| 66 |
###STEP 5
|
| 67 |
# Define a function to find the most relevant text chunks for a given query, chunk_embeddings, and text_chunks
|
|
@@ -100,7 +100,8 @@ def get_top_chunks(query, chunk_embeddings, text_chunks):
|
|
| 100 |
|
| 101 |
# Print the top results
|
| 102 |
#print(top_results)
|
| 103 |
-
|
|
|
|
| 104 |
#AI API being used
|
| 105 |
client= InferenceClient("Qwen/Qwen2.5-7B-Instruct-1M")
|
| 106 |
|
|
|
|
| 61 |
return chunk_embeddings
|
| 62 |
|
| 63 |
# Call the create_embeddings function and store the result in a new chunk_embeddings variable
|
| 64 |
+
#chunk_embeddings = create_embeddings(cleaned_chunks) # Complete this line
|
| 65 |
|
| 66 |
###STEP 5
|
| 67 |
# Define a function to find the most relevant text chunks for a given query, chunk_embeddings, and text_chunks
|
|
|
|
| 100 |
|
| 101 |
# Print the top results
|
| 102 |
#print(top_results)
|
| 103 |
+
cleaned_chunks = preprocess_text(poverty_and_education)
|
| 104 |
+
chunk_embeddings = create_embeddings(cleaned_chunks)
|
| 105 |
#AI API being used
|
| 106 |
client= InferenceClient("Qwen/Qwen2.5-7B-Instruct-1M")
|
| 107 |
|