Skip to content

Commit ea21908

Browse files
Merge pull request #8 from openfoodfacts/readme
small fixes
2 parents b6e3493 + 9632c17 commit ea21908

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

scripts/compute_metrics_for_model_on_test_sets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/python3
22
"""
33
compute_metrics_for_model_on_test_sets [name of model results] [names of one or more input test sets]
4-
5-
This scriptwill go through each product JSON file of the specified input test sets to:
4+
5+
This script will go through each product JSON file of the specified input test sets to:
66
- Compute accuracy metrics comparing the estimated "percent_estimate" field in the resulting product
77
to the "percent" field in the input product
88
- Store product level metrics in the resulting product

scripts/parse_ingredients_for_input_test_sets.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@
4040

4141
product_opener_api_url = "http://world.openfoodfacts.localhost/api/v3/product_services"
4242
request_data = {
43+
#"services": ["parse_ingredients_text", "extend_ingredients", "estimate_ingredients_percent"],
4344
"services": ["parse_ingredients_text", "extend_ingredients"],
44-
"fields": ["all"],
45+
"fields": [""],
46+
"lc": "fr",
47+
"tags_lc": "fr",
4548
"product": product
4649
}
4750
response = requests.post(product_opener_api_url, json=request_data)

0 commit comments

Comments
 (0)