Rhasan97 commited on
Commit
c064f09
1 Parent(s): 04af367
app.py CHANGED
@@ -3,14 +3,14 @@ import onnxruntime as rt
3
  from transformers import AutoTokenizer
4
  import torch, json
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
 
 
3
  from transformers import AutoTokenizer
4
  import torch, json
5
 
6
+ tokenizer = AutoTokenizer.from_pretrained("roberta-base")
7
 
8
+ with open("recipe_types_encoded19.json", "r") as fp:
9
  encode_types = json.load(fp)
10
 
11
  recipe = list(encode_types.keys())
12
 
13
+ inf_session = rt.InferenceSession('recipe-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 DELETED
@@ -1 +0,0 @@
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}
 
 
recipe3-classifier.onnx → recipe-classifier-stage-18.pkl RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8422ac641b65e11a5de7aa537fb7201b794d5606f49c3fecf26d6ca7cf4dbe2b
3
- size 328773212
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ee07d4871090baf7cbfc1096cbd15a3b64b54164bf66ced8769f660c17c1396d
3
+ size 500811720
recipe-classifier.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84e305096a173db27b4b760d7b996451c1704f037c56f07c2bc6d850c2e5f338
3
+ size 499042987
recipe_types_encoded19.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"Vegetable": 0, "Cheese": 1, "low-carb": 2, "non-alcoholic": 3, "egg-free": 4, "Low-cholesterol": 5, "250-400 Calorie": 6, "Gluten-free": 7, "nutritional": 8, "High-protein": 9, "Mineral-rich": 10, "lactose-free": 11, "100-250 Calorie": 12, "pastry": 13, "North America": 14, "Baking": 15, "high-fiber": 16, "Vegan": 17, "diet": 18, "Pasta": 19, "meat-free": 20, "Fruit": 21, "Fish": 22, "Vegetarian": 23, "Beef": 24, "mushroom": 25, "Meat": 26, "salad": 27, "Eggs": 28, "Seafood": 29, "soup": 30, "German": 31, "Dessert": 32, "Low-sugar": 33, "saltwater fish": 34, "fruit-vegetable": 35, "Vegetable Salad": 36, "400-500 Calorie": 37, "Chicken": 38, "Asian": 39, "Tropical Fruit": 40, "Appetizer": 41, "Roast": 42, "Shrimp": 43, "Sprout": 44, "Shellfish": 45, "Low-fat": 46, "Italian": 47, "Pork": 48, "American": 49, "Dairy": 50, "Dough": 51, "Rice": 52, "Pome Fruit": 53, "Fruit Dessert": 54}