Spaces:
Running
Running
Commit
·
71ee9d9
1
Parent(s):
2fe9413
add file open
Browse files
app.py
CHANGED
@@ -12,8 +12,12 @@ import os
|
|
12 |
os.environ["USE_FLASH_ATTENTION"] = "0"
|
13 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
14 |
|
15 |
-
product_strings = [
|
16 |
-
recipe_strings = [
|
|
|
|
|
|
|
|
|
17 |
|
18 |
client = QdrantClient(":memory:") #QdrantClient("localhost:6333")
|
19 |
client.set_model("sentence-transformers/all-MiniLM-L6-v2")
|
|
|
12 |
os.environ["USE_FLASH_ATTENTION"] = "0"
|
13 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
14 |
|
15 |
+
product_strings = []
|
16 |
+
recipe_strings = []
|
17 |
+
with open('../Data/product_strings.json', 'r', encoding='utf-8') as f:
|
18 |
+
product_strings = [product for product in json.load(f)["recipe_strings"]]
|
19 |
+
with open('../Data/recipe_strings.json', 'r', encoding='utf-8') as f:
|
20 |
+
recipe_strings = [recipe for recipe in json.load(f)["recipe_strings"]]
|
21 |
|
22 |
client = QdrantClient(":memory:") #QdrantClient("localhost:6333")
|
23 |
client.set_model("sentence-transformers/all-MiniLM-L6-v2")
|