different
Browse files- app.py +2 -2
- recipe-3_types_encoded.json +1 -0
- recipe-classifier.onnx → recipe3-classifier.onnx +2 -2
- recipe_types_encoded.json +0 -1
app.py
CHANGED
@@ -5,12 +5,12 @@ import torch, json
|
|
5 |
|
6 |
tokenizer = AutoTokenizer.from_pretrained("distilroberta-base")
|
7 |
|
8 |
-
with open("
|
9 |
encode_types = json.load(fp)
|
10 |
|
11 |
recipe = list(encode_types.keys())
|
12 |
|
13 |
-
inf_session = rt.InferenceSession('
|
14 |
input_name = inf_session.get_inputs()[0].name
|
15 |
output_name = inf_session.get_outputs()[0].name
|
16 |
|
|
|
5 |
|
6 |
tokenizer = AutoTokenizer.from_pretrained("distilroberta-base")
|
7 |
|
8 |
+
with open("recipe-3_types_encoded.json", "r") as fp:
|
9 |
encode_types = json.load(fp)
|
10 |
|
11 |
recipe = list(encode_types.keys())
|
12 |
|
13 |
+
inf_session = rt.InferenceSession('recipe3-classifier.onnx')
|
14 |
input_name = inf_session.get_inputs()[0].name
|
15 |
output_name = inf_session.get_outputs()[0].name
|
16 |
|
recipe-3_types_encoded.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"low-carb": 0, "Cheese": 1, "Vegetable": 2, "Low-cholesterol": 3, "Gluten-free": 4, "nutritional": 5, "High-protein": 6, "Baking": 7, "pastry": 8, "high-fiber": 9, "Vegan": 10, "diet": 11, "Pasta": 12, "Fish": 13, "High-fiber Vegetarian Dish": 14, "Beef": 15, "salad": 16, "Eggs": 17, "Vegetarian": 18, "saltwater fish": 19, "fruit-vegetable": 20, "Vegetable Salad": 21, "flowering vegetables": 22, "Meat": 23, "Sauce": 24, "Asian": 25, "Chicken": 26, "Dessert": 27, "Herb": 28, "baked dish": 29, "Roast": 30, "Legume": 31, "Shrimp": 32, "Italian": 33, "soup": 34, "Seafood": 35, "non-alcoholic": 36, "Casserole": 37, "mushroom": 38, "Spices": 39, "leafy green vegetable": 40, "Sprout": 41, "Fruit": 42, "Tropical Fruit": 43, "Dough": 44, "Rice": 45, "Pome Fruit": 46, "Fruit Dessert": 47}
|
recipe-classifier.onnx → recipe3-classifier.onnx
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8422ac641b65e11a5de7aa537fb7201b794d5606f49c3fecf26d6ca7cf4dbe2b
|
3 |
+
size 328773212
|
recipe_types_encoded.json
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"Vegetable": 0, "low-carb": 1, "Cheese": 2, "Healthy Eating": 3, "Low-cholesterol": 4, "High-protein": 5, "nutritional": 6, "Gluten-free": 7, "Clean Eating": 8, "Baking": 9, "pastry": 10, "high-fiber": 11, "diet": 12, "Fish": 13, "High-fiber Vegetarian Dish": 14, "Beef": 15, "salad": 16, "Eggs": 17, "Vegetarian": 18, "fruit-vegetable": 19, "saltwater fish": 20, "Vegetable Salad": 21, "flowering vegetables": 22, "Meat": 23, "Sauce": 24, "Asian": 25, "Chicken": 26, "Dessert": 27, "Herb": 28, "baked dish": 29, "Roast": 30, "Legume": 31, "Shrimp": 32, "Italian": 33, "soup": 34, "Seafood": 35, "non-alcoholic": 36, "Casserole": 37, "mushroom": 38, "Spices": 39, "leafy green vegetable": 40, "Sprout": 41, "Fruit": 42, "Tropical Fruit": 43, "Dough": 44, "Pome Fruit": 45, "Pasta": 46, "Rice": 47, "Fruit Dessert": 48}
|
|
|
|