Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -128,8 +128,13 @@ brand_chunks = preprocess_text(brand_options)
|
|
| 128 |
safe_chunks = preprocess_text(not_safe)
|
| 129 |
health_chunks = preprocess_text(health_risks)
|
| 130 |
nutrition_chunks = preprocess_text(nutrition)
|
|
|
|
| 131 |
|
| 132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
|
| 134 |
# Load the pre-trained embedding model that converts text to vectors
|
| 135 |
model = SentenceTransformer('all-MiniLM-L6-v2')
|
|
|
|
| 128 |
safe_chunks = preprocess_text(not_safe)
|
| 129 |
health_chunks = preprocess_text(health_risks)
|
| 130 |
nutrition_chunks = preprocess_text(nutrition)
|
| 131 |
+
all_chunks = brand_chunks + safe_chunks + health_chunks + nutrition_chunks
|
| 132 |
|
| 133 |
+
brand_embeddings = create_embeddings(brand_chunks)
|
| 134 |
+
safe_embeddings = create_embeddings(safe_chunks)
|
| 135 |
+
health_embeddings = create_embeddings(health_chunks)
|
| 136 |
+
nutrition_embeddings = create_embeddings(nutrition_chunks)
|
| 137 |
+
all_embeddings = create_embeddings(all_chunks)
|
| 138 |
|
| 139 |
# Load the pre-trained embedding model that converts text to vectors
|
| 140 |
model = SentenceTransformer('all-MiniLM-L6-v2')
|