From 53fca95da59dab3348e4636cb5de3cb2cc94de7a Mon Sep 17 00:00:00 2001 From: samuel pelletier-evraire Date: Tue, 9 Apr 2024 15:27:39 -0400 Subject: [PATCH 01/16] Update repository description --- README.md | 2 +- Tests/Responses/response_actiSol1.json | 29 ++++++ Tests/Responses/response_sunshine_mix.json | 19 ++++ .../Acti_Sol1/2024-04-04_12h33m43s_test.json | 40 ++++++++ .../Acti_Sol1/2024-04-04_12h41m25s_test.json | 40 ++++++++ .../2024-04-04_13h15m00s_test.json | 46 ++++++++++ .../2024-04-04_13h22m44s_test.json | 46 ++++++++++ .../2024-04-04_13h24m44s_test.json | 46 ++++++++++ .../2024-04-04_14h28m40s_test.json | 46 ++++++++++ .../Acti_Sol1/2024-04-04_12h33m28s_test.json | 44 +++++++++ .../Acti_Sol1/2024-04-04_12h41m09s_test.json | 44 +++++++++ .../2024-04-04_13h24m29s_test.json | 1 + .../2024-04-04_14h28m26s_test.json | 1 + results%Test.json | 0 ...good_responses_modified_question%Test.json | 88 ++++++++++++++++++ ...good_responses_original_question%Test.json | 92 +++++++++++++++++++ ...mix_modified_question_comparision%Tes.json | 52 +++++++++++ ...ix_modified_question_comparision%Test.json | 52 +++++++++++ ...ix_original_question_comparision%Test.json | 3 + 19 files changed, 690 insertions(+), 1 deletion(-) create mode 100644 Tests/Responses/response_actiSol1.json create mode 100644 Tests/Responses/response_sunshine_mix.json create mode 100644 Tests/TestsResult/Modified_question/Acti_Sol1/2024-04-04_12h33m43s_test.json create mode 100644 Tests/TestsResult/Modified_question/Acti_Sol1/2024-04-04_12h41m25s_test.json create mode 100644 Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h15m00s_test.json create mode 100644 Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h22m44s_test.json create mode 100644 Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h24m44s_test.json create mode 100644 Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_14h28m40s_test.json create mode 100644 Tests/TestsResult/Original_question/Acti_Sol1/2024-04-04_12h33m28s_test.json create mode 100644 Tests/TestsResult/Original_question/Acti_Sol1/2024-04-04_12h41m09s_test.json create mode 100644 Tests/TestsResult/Original_question/sunshine_mix/2024-04-04_13h24m29s_test.json create mode 100644 Tests/TestsResult/Original_question/sunshine_mix/2024-04-04_14h28m26s_test.json create mode 100644 results%Test.json create mode 100644 results_good_responses_modified_question%Test.json create mode 100644 results_good_responses_original_question%Test.json create mode 100644 results_sunshinemix_modified_question_comparision%Tes.json create mode 100644 results_sunshinemix_modified_question_comparision%Test.json create mode 100644 results_sunshinemix_original_question_comparision%Test.json diff --git a/README.md b/README.md index 19d5f209..580e8a65 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # harvester-prototype -This repository is for the frontend of the project react +This repository is for the prototyping of the project Harvester. diff --git a/Tests/Responses/response_actiSol1.json b/Tests/Responses/response_actiSol1.json new file mode 100644 index 00000000..e10b5ec9 --- /dev/null +++ b/Tests/Responses/response_actiSol1.json @@ -0,0 +1,29 @@ +{ + "name_of_the_registrant": true, + "address_of_the_registrant": true, + "name_of_fertiliser": true, + "name_of_fertiliser_contain_term": true, + "mixture_product_options": true, + "direction_of_use_on_bag": true, + "direction_of_use_contain_option1": true, + "direction_of_use_contain_option2": "None", + "direction_of_use_contain_option3": "None", + "weight": true, + "measurement_unit": true, + "guaranteed_analysis": true, + "0%_garantees": true, + "active_ingredients_only":true, + "include_minimal_requirement": true, + "minimum_n": true, + "minimum_p2o5": true, + "contain_phosphate": false, + "minimum_k2o": true, + "secondary_nutrient": true, + "contain_organic_matter": true, + "necessary_precaution": true, + "label_misleading_information" :true, + "metric_usage": true, + "good_metric_conversion": true, + "lot_number":true, + "two_language": true +} \ No newline at end of file diff --git a/Tests/Responses/response_sunshine_mix.json b/Tests/Responses/response_sunshine_mix.json new file mode 100644 index 00000000..2cc7dcd7 --- /dev/null +++ b/Tests/Responses/response_sunshine_mix.json @@ -0,0 +1,19 @@ +{ + "name_of_the_registrant": true, + "address_of_the_registrant": true, + "name_of_fertiliser": true, + "name_of_fertiliser_contain_term": true, + "mixture_product_options": true, + "direction_of_use_on_bag": true, + "direction_of_use_contain_option1": "None", + "direction_of_use_contain_option2": "None", + "direction_of_use_contain_option3": true, + "weight": true, + "measurement_unit": true, + "acronyms": true, + "metric_usage": true, + "seller_guarantee": true, + "good_metric_conversion": true, + "lot_number":true, + "two_language": true +} \ No newline at end of file diff --git a/Tests/TestsResult/Modified_question/Acti_Sol1/2024-04-04_12h33m43s_test.json b/Tests/TestsResult/Modified_question/Acti_Sol1/2024-04-04_12h33m43s_test.json new file mode 100644 index 00000000..83be052b --- /dev/null +++ b/Tests/TestsResult/Modified_question/Acti_Sol1/2024-04-04_12h33m43s_test.json @@ -0,0 +1,40 @@ +{ + "name_of_the_registrant": "Usine Agro-Sol Enr.", + "address_of_the_registrant": "1345, rang 3 O. de Wendover, Notre-Dame-du-Bon-Conseil, Quebec, Canada, J0C 1V0", + "name_of_fertiliser": "Mother Hen Tomatoes and vegetables 4-6-8", + "weight": "2.5 kg", + "measurement_unit": "kg", + "guaranteed_analysis": true, + "0%_garantees": false, + "active_ingredients_only": true, + "include_minimal_requirement": true, + "minimum_n": "4.0 %", + "minimum_p2o5": "6.0 %", + "contain_phosphate": "Total phosphoric acid as %: 8.5%, avalaible phosphoric acid as %: 6.0%", + "minimum_k2o": "8.0 %", + "secondary_nutrient": "Calcium (Ca): 1.8 %", + "proponent_not_required": false, + "written_full": true, + "microorganism_must_contain": false, + "complex_microorganisms_community": false, + "contain_organic_matter": false, + "other_active_ingredient": false, + "less_then_0.001%": false, + "guaranteed_analysis_contain_active_pesticide_ingredient": false, + "minimum_%_active_ingredient_mixture/product": false, + "minimum_%_active_ingredient_final_treated_product": false, + "necessary_precaution": true, + "allergen": false, + "growing_medium_precautionary_statement": false, + "label_misleading_information": false, + "acronyms": false, + "metric_usage": true, + "good_metric_conversion": true, + "seller_guarantee": false, + "lot_number": "2023-03-08", + "two_language": true, + "contain_claim_of_definition_of_pest": false, + "registered_polymer": false, + "polymer_precautionary_statement": false, + "conform_direction_of_use": true +} \ No newline at end of file diff --git a/Tests/TestsResult/Modified_question/Acti_Sol1/2024-04-04_12h41m25s_test.json b/Tests/TestsResult/Modified_question/Acti_Sol1/2024-04-04_12h41m25s_test.json new file mode 100644 index 00000000..83be052b --- /dev/null +++ b/Tests/TestsResult/Modified_question/Acti_Sol1/2024-04-04_12h41m25s_test.json @@ -0,0 +1,40 @@ +{ + "name_of_the_registrant": "Usine Agro-Sol Enr.", + "address_of_the_registrant": "1345, rang 3 O. de Wendover, Notre-Dame-du-Bon-Conseil, Quebec, Canada, J0C 1V0", + "name_of_fertiliser": "Mother Hen Tomatoes and vegetables 4-6-8", + "weight": "2.5 kg", + "measurement_unit": "kg", + "guaranteed_analysis": true, + "0%_garantees": false, + "active_ingredients_only": true, + "include_minimal_requirement": true, + "minimum_n": "4.0 %", + "minimum_p2o5": "6.0 %", + "contain_phosphate": "Total phosphoric acid as %: 8.5%, avalaible phosphoric acid as %: 6.0%", + "minimum_k2o": "8.0 %", + "secondary_nutrient": "Calcium (Ca): 1.8 %", + "proponent_not_required": false, + "written_full": true, + "microorganism_must_contain": false, + "complex_microorganisms_community": false, + "contain_organic_matter": false, + "other_active_ingredient": false, + "less_then_0.001%": false, + "guaranteed_analysis_contain_active_pesticide_ingredient": false, + "minimum_%_active_ingredient_mixture/product": false, + "minimum_%_active_ingredient_final_treated_product": false, + "necessary_precaution": true, + "allergen": false, + "growing_medium_precautionary_statement": false, + "label_misleading_information": false, + "acronyms": false, + "metric_usage": true, + "good_metric_conversion": true, + "seller_guarantee": false, + "lot_number": "2023-03-08", + "two_language": true, + "contain_claim_of_definition_of_pest": false, + "registered_polymer": false, + "polymer_precautionary_statement": false, + "conform_direction_of_use": true +} \ No newline at end of file diff --git a/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h15m00s_test.json b/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h15m00s_test.json new file mode 100644 index 00000000..c4f0c843 --- /dev/null +++ b/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h15m00s_test.json @@ -0,0 +1,46 @@ +{ + "name_of_the_registrant": "Sun Gro Horticulture Canada Ltd.", + "address_of_the_registrant": "5230 Beach Rd Box 188\nSeba Beach AB T0E 2B0", + "name_of_fertiliser": "SUNSHINE MIX #4", + "suffix_pesticide": false, + "registration_number": false, + "mixture_product_options": false, + "seed_treated_fertilizer_supplement": false, + "include_tank_mixing": true, + "weight": "84.9 L (3 cu. ft.)", + "measurement_unit": true, + "guaranteed_analysis": true, + "0%_garantees": false, + "active_ingredients_only": false, + "include_minimal_requirement": true, + "minimum_n": "0.01%", + "minimum_p2o5": "0.02%", + "lawn_turf_low_phosphate_direction_of_use": false, + "contain_phosphate": "Total phosphoric acid as %: 0.02%\navalaible phosphoric acid as %: 0.02%", + "minimum_k2o": "0.04%", + "secondary_nutrient": "Calcium (Ca): 0.01%\nMagnesium (Mg): 0.005%\nSulphur (S): 0.01%", + "proponent_not_required": false, + "written_full": true, + "microorganism_must_contain": false, + "complex_microorganisms_community": false, + "contain_organic_matter": false, + "other_active_ingredient": false, + "less_then_0.001%": false, + "guaranteed_analysis_contain_active_pesticide_ingredient": false, + "minimum_%_active_ingredient_mixture/product": false, + "minimum_%_active_ingredient_final_treated_product": false, + "necessary_precaution": true, + "allergen": false, + "growing_medium_precautionary_statement": false, + "label_misleading_information": false, + "acronyms": false, + "metric_usage": true, + "good_metric_conversion": true, + "seller_guarantee": false, + "lot_number": "23-66-32", + "two_language": true, + "contain_claim_of_definition_of_pest": false, + "registered_polymer": false, + "polymer_precautionary_statement": false, + "conform_direction_of_use": false +} \ No newline at end of file diff --git a/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h22m44s_test.json b/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h22m44s_test.json new file mode 100644 index 00000000..c4f0c843 --- /dev/null +++ b/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h22m44s_test.json @@ -0,0 +1,46 @@ +{ + "name_of_the_registrant": "Sun Gro Horticulture Canada Ltd.", + "address_of_the_registrant": "5230 Beach Rd Box 188\nSeba Beach AB T0E 2B0", + "name_of_fertiliser": "SUNSHINE MIX #4", + "suffix_pesticide": false, + "registration_number": false, + "mixture_product_options": false, + "seed_treated_fertilizer_supplement": false, + "include_tank_mixing": true, + "weight": "84.9 L (3 cu. ft.)", + "measurement_unit": true, + "guaranteed_analysis": true, + "0%_garantees": false, + "active_ingredients_only": false, + "include_minimal_requirement": true, + "minimum_n": "0.01%", + "minimum_p2o5": "0.02%", + "lawn_turf_low_phosphate_direction_of_use": false, + "contain_phosphate": "Total phosphoric acid as %: 0.02%\navalaible phosphoric acid as %: 0.02%", + "minimum_k2o": "0.04%", + "secondary_nutrient": "Calcium (Ca): 0.01%\nMagnesium (Mg): 0.005%\nSulphur (S): 0.01%", + "proponent_not_required": false, + "written_full": true, + "microorganism_must_contain": false, + "complex_microorganisms_community": false, + "contain_organic_matter": false, + "other_active_ingredient": false, + "less_then_0.001%": false, + "guaranteed_analysis_contain_active_pesticide_ingredient": false, + "minimum_%_active_ingredient_mixture/product": false, + "minimum_%_active_ingredient_final_treated_product": false, + "necessary_precaution": true, + "allergen": false, + "growing_medium_precautionary_statement": false, + "label_misleading_information": false, + "acronyms": false, + "metric_usage": true, + "good_metric_conversion": true, + "seller_guarantee": false, + "lot_number": "23-66-32", + "two_language": true, + "contain_claim_of_definition_of_pest": false, + "registered_polymer": false, + "polymer_precautionary_statement": false, + "conform_direction_of_use": false +} \ No newline at end of file diff --git a/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h24m44s_test.json b/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h24m44s_test.json new file mode 100644 index 00000000..c4f0c843 --- /dev/null +++ b/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h24m44s_test.json @@ -0,0 +1,46 @@ +{ + "name_of_the_registrant": "Sun Gro Horticulture Canada Ltd.", + "address_of_the_registrant": "5230 Beach Rd Box 188\nSeba Beach AB T0E 2B0", + "name_of_fertiliser": "SUNSHINE MIX #4", + "suffix_pesticide": false, + "registration_number": false, + "mixture_product_options": false, + "seed_treated_fertilizer_supplement": false, + "include_tank_mixing": true, + "weight": "84.9 L (3 cu. ft.)", + "measurement_unit": true, + "guaranteed_analysis": true, + "0%_garantees": false, + "active_ingredients_only": false, + "include_minimal_requirement": true, + "minimum_n": "0.01%", + "minimum_p2o5": "0.02%", + "lawn_turf_low_phosphate_direction_of_use": false, + "contain_phosphate": "Total phosphoric acid as %: 0.02%\navalaible phosphoric acid as %: 0.02%", + "minimum_k2o": "0.04%", + "secondary_nutrient": "Calcium (Ca): 0.01%\nMagnesium (Mg): 0.005%\nSulphur (S): 0.01%", + "proponent_not_required": false, + "written_full": true, + "microorganism_must_contain": false, + "complex_microorganisms_community": false, + "contain_organic_matter": false, + "other_active_ingredient": false, + "less_then_0.001%": false, + "guaranteed_analysis_contain_active_pesticide_ingredient": false, + "minimum_%_active_ingredient_mixture/product": false, + "minimum_%_active_ingredient_final_treated_product": false, + "necessary_precaution": true, + "allergen": false, + "growing_medium_precautionary_statement": false, + "label_misleading_information": false, + "acronyms": false, + "metric_usage": true, + "good_metric_conversion": true, + "seller_guarantee": false, + "lot_number": "23-66-32", + "two_language": true, + "contain_claim_of_definition_of_pest": false, + "registered_polymer": false, + "polymer_precautionary_statement": false, + "conform_direction_of_use": false +} \ No newline at end of file diff --git a/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_14h28m40s_test.json b/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_14h28m40s_test.json new file mode 100644 index 00000000..c4f0c843 --- /dev/null +++ b/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_14h28m40s_test.json @@ -0,0 +1,46 @@ +{ + "name_of_the_registrant": "Sun Gro Horticulture Canada Ltd.", + "address_of_the_registrant": "5230 Beach Rd Box 188\nSeba Beach AB T0E 2B0", + "name_of_fertiliser": "SUNSHINE MIX #4", + "suffix_pesticide": false, + "registration_number": false, + "mixture_product_options": false, + "seed_treated_fertilizer_supplement": false, + "include_tank_mixing": true, + "weight": "84.9 L (3 cu. ft.)", + "measurement_unit": true, + "guaranteed_analysis": true, + "0%_garantees": false, + "active_ingredients_only": false, + "include_minimal_requirement": true, + "minimum_n": "0.01%", + "minimum_p2o5": "0.02%", + "lawn_turf_low_phosphate_direction_of_use": false, + "contain_phosphate": "Total phosphoric acid as %: 0.02%\navalaible phosphoric acid as %: 0.02%", + "minimum_k2o": "0.04%", + "secondary_nutrient": "Calcium (Ca): 0.01%\nMagnesium (Mg): 0.005%\nSulphur (S): 0.01%", + "proponent_not_required": false, + "written_full": true, + "microorganism_must_contain": false, + "complex_microorganisms_community": false, + "contain_organic_matter": false, + "other_active_ingredient": false, + "less_then_0.001%": false, + "guaranteed_analysis_contain_active_pesticide_ingredient": false, + "minimum_%_active_ingredient_mixture/product": false, + "minimum_%_active_ingredient_final_treated_product": false, + "necessary_precaution": true, + "allergen": false, + "growing_medium_precautionary_statement": false, + "label_misleading_information": false, + "acronyms": false, + "metric_usage": true, + "good_metric_conversion": true, + "seller_guarantee": false, + "lot_number": "23-66-32", + "two_language": true, + "contain_claim_of_definition_of_pest": false, + "registered_polymer": false, + "polymer_precautionary_statement": false, + "conform_direction_of_use": false +} \ No newline at end of file diff --git a/Tests/TestsResult/Original_question/Acti_Sol1/2024-04-04_12h33m28s_test.json b/Tests/TestsResult/Original_question/Acti_Sol1/2024-04-04_12h33m28s_test.json new file mode 100644 index 00000000..1252d331 --- /dev/null +++ b/Tests/TestsResult/Original_question/Acti_Sol1/2024-04-04_12h33m28s_test.json @@ -0,0 +1,44 @@ +{ + "name_of_the_registrant": "Acti-Sol", + "address_of_the_registrant": "1303 Rang Ste-Anne, Notre-Dame-du-Bon-Conseil, Quebec, Canada, J0C 1V0", + "name_of_fertiliser": "Mother Hen Tomatoes and Vegetables", + "registration_number": "80062444", + "mixture_product_options": "Record keeping option", + "weight": "2.5 kg", + "measurement_unit": "kg", + "guaranteed_analysis": true, + "0%_garantees": false, + "active_ingredients_only": true, + "include_minimal_requirement": false, + "minimum_n": "4.0%", + "minimum_p2o5": "6.0%", + "minimum_k2o": "8.0%", + "secondary_nutrient": false, + "contain_phosphate": true, + "minimum_total_phosphoric_acid": "8.0%", + "minimum_available_phosphoric_acid": "6.0%", + "proponent_not_required": false, + "written_full": true, + "microorganism_must_contain": false, + "complex_microorganisms_community": false, + "contain_organic_matter": false, + "other_active_ingredient": false, + "less_then_0.001%": false, + "guaranteed_analysis_contain_active_pesticide_ingredient": false, + "minimum_%_active_ingredient_mixture/product": false, + "minimum_%_active_ingredient_final_treated_product": false, + "necessary_precaution": false, + "allergen": false, + "growing_medium_precautionary_statement": false, + "label_misleading_information": false, + "acronyms": false, + "metric_usage": true, + "good_metric_conversion": true, + "seller_guarantee": false, + "lot_number": false, + "two_language": true, + "contain_claim_of_definition_of_pest": false, + "registered_polymer": false, + "polymer_precautionary_statement": false, + "conform_direction_of_use": false +} \ No newline at end of file diff --git a/Tests/TestsResult/Original_question/Acti_Sol1/2024-04-04_12h41m09s_test.json b/Tests/TestsResult/Original_question/Acti_Sol1/2024-04-04_12h41m09s_test.json new file mode 100644 index 00000000..1252d331 --- /dev/null +++ b/Tests/TestsResult/Original_question/Acti_Sol1/2024-04-04_12h41m09s_test.json @@ -0,0 +1,44 @@ +{ + "name_of_the_registrant": "Acti-Sol", + "address_of_the_registrant": "1303 Rang Ste-Anne, Notre-Dame-du-Bon-Conseil, Quebec, Canada, J0C 1V0", + "name_of_fertiliser": "Mother Hen Tomatoes and Vegetables", + "registration_number": "80062444", + "mixture_product_options": "Record keeping option", + "weight": "2.5 kg", + "measurement_unit": "kg", + "guaranteed_analysis": true, + "0%_garantees": false, + "active_ingredients_only": true, + "include_minimal_requirement": false, + "minimum_n": "4.0%", + "minimum_p2o5": "6.0%", + "minimum_k2o": "8.0%", + "secondary_nutrient": false, + "contain_phosphate": true, + "minimum_total_phosphoric_acid": "8.0%", + "minimum_available_phosphoric_acid": "6.0%", + "proponent_not_required": false, + "written_full": true, + "microorganism_must_contain": false, + "complex_microorganisms_community": false, + "contain_organic_matter": false, + "other_active_ingredient": false, + "less_then_0.001%": false, + "guaranteed_analysis_contain_active_pesticide_ingredient": false, + "minimum_%_active_ingredient_mixture/product": false, + "minimum_%_active_ingredient_final_treated_product": false, + "necessary_precaution": false, + "allergen": false, + "growing_medium_precautionary_statement": false, + "label_misleading_information": false, + "acronyms": false, + "metric_usage": true, + "good_metric_conversion": true, + "seller_guarantee": false, + "lot_number": false, + "two_language": true, + "contain_claim_of_definition_of_pest": false, + "registered_polymer": false, + "polymer_precautionary_statement": false, + "conform_direction_of_use": false +} \ No newline at end of file diff --git a/Tests/TestsResult/Original_question/sunshine_mix/2024-04-04_13h24m29s_test.json b/Tests/TestsResult/Original_question/sunshine_mix/2024-04-04_13h24m29s_test.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/Tests/TestsResult/Original_question/sunshine_mix/2024-04-04_13h24m29s_test.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/Tests/TestsResult/Original_question/sunshine_mix/2024-04-04_14h28m26s_test.json b/Tests/TestsResult/Original_question/sunshine_mix/2024-04-04_14h28m26s_test.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/Tests/TestsResult/Original_question/sunshine_mix/2024-04-04_14h28m26s_test.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/results%Test.json b/results%Test.json new file mode 100644 index 00000000..e69de29b diff --git a/results_good_responses_modified_question%Test.json b/results_good_responses_modified_question%Test.json new file mode 100644 index 00000000..ec38de41 --- /dev/null +++ b/results_good_responses_modified_question%Test.json @@ -0,0 +1,88 @@ +{ + "tests": [ + { + "key": "necessary_precaution", + "similarity_score": 1.0 + }, + { + "key": "label_misleading_information", + "similarity_score": 0.2222222222222222 + }, + { + "key": "minimum_p2o5", + "similarity_score": 100.0 + }, + { + "key": "weight", + "similarity_score": 100.0 + }, + { + "key": "secondary_nutrient", + "similarity_score": 100.0 + }, + { + "key": "0%_garantees", + "similarity_score": 0.2222222222222222 + }, + { + "key": "include_minimal_requirement", + "similarity_score": 1.0 + }, + { + "key": "address_of_the_registrant", + "similarity_score": 100.0 + }, + { + "key": "contain_phosphate", + "similarity_score": 22.22222222222222 + }, + { + "key": "name_of_fertiliser", + "similarity_score": 100.0 + }, + { + "key": "minimum_k2o", + "similarity_score": 100.0 + }, + { + "key": "active_ingredients_only", + "similarity_score": 1.0 + }, + { + "key": "contain_organic_matter", + "similarity_score": 0.2222222222222222 + }, + { + "key": "lot_number", + "similarity_score": 100.0 + }, + { + "key": "two_language", + "similarity_score": 1.0 + }, + { + "key": "good_metric_conversion", + "similarity_score": 1.0 + }, + { + "key": "measurement_unit", + "similarity_score": 100.0 + }, + { + "key": "minimum_n", + "similarity_score": 100.0 + }, + { + "key": "metric_usage", + "similarity_score": 1.0 + }, + { + "key": "name_of_the_registrant", + "similarity_score": 100.0 + }, + { + "key": "guaranteed_analysis", + "similarity_score": 1.0 + } + ] +} \ No newline at end of file diff --git a/results_good_responses_original_question%Test.json b/results_good_responses_original_question%Test.json new file mode 100644 index 00000000..13f8b353 --- /dev/null +++ b/results_good_responses_original_question%Test.json @@ -0,0 +1,92 @@ +{ + "tests": [ + { + "key": "necessary_precaution", + "similarity_score": 0.2222222222222222 + }, + { + "key": "label_misleading_information", + "similarity_score": 0.2222222222222222 + }, + { + "key": "minimum_p2o5", + "similarity_score": 100.0 + }, + { + "key": "mixture_product_options", + "similarity_score": 100.0 + }, + { + "key": "weight", + "similarity_score": 100.0 + }, + { + "key": "secondary_nutrient", + "similarity_score": 0.2222222222222222 + }, + { + "key": "0%_garantees", + "similarity_score": 0.2222222222222222 + }, + { + "key": "include_minimal_requirement", + "similarity_score": 0.2222222222222222 + }, + { + "key": "address_of_the_registrant", + "similarity_score": 100.0 + }, + { + "key": "contain_phosphate", + "similarity_score": 0.2222222222222222 + }, + { + "key": "name_of_fertiliser", + "similarity_score": 100.0 + }, + { + "key": "minimum_k2o", + "similarity_score": 100.0 + }, + { + "key": "active_ingredients_only", + "similarity_score": 1.0 + }, + { + "key": "contain_organic_matter", + "similarity_score": 0.2222222222222222 + }, + { + "key": "lot_number", + "similarity_score": 0.2222222222222222 + }, + { + "key": "two_language", + "similarity_score": 1.0 + }, + { + "key": "good_metric_conversion", + "similarity_score": 1.0 + }, + { + "key": "measurement_unit", + "similarity_score": 100.0 + }, + { + "key": "minimum_n", + "similarity_score": 100.0 + }, + { + "key": "metric_usage", + "similarity_score": 1.0 + }, + { + "key": "name_of_the_registrant", + "similarity_score": 100.0 + }, + { + "key": "guaranteed_analysis", + "similarity_score": 1.0 + } + ] +} \ No newline at end of file diff --git a/results_sunshinemix_modified_question_comparision%Tes.json b/results_sunshinemix_modified_question_comparision%Tes.json new file mode 100644 index 00000000..2e9c8664 --- /dev/null +++ b/results_sunshinemix_modified_question_comparision%Tes.json @@ -0,0 +1,52 @@ +{ + "tests": [ + { + "key": "mixture_product_options", + "similarity_score": 22.222222222222218 + }, + { + "key": "name_of_the_registrant", + "similarity_score": 100.0 + }, + { + "key": "measurement_unit", + "similarity_score": 100.0 + }, + { + "key": "seller_guarantee", + "similarity_score": 22.222222222222218 + }, + { + "key": "metric_usage", + "similarity_score": 100.0 + }, + { + "key": "lot_number", + "similarity_score": 100.0 + }, + { + "key": "name_of_fertiliser", + "similarity_score": 100.0 + }, + { + "key": "address_of_the_registrant", + "similarity_score": 100.0 + }, + { + "key": "two_language", + "similarity_score": 100.0 + }, + { + "key": "weight", + "similarity_score": 100.0 + }, + { + "key": "good_metric_conversion", + "similarity_score": 100.0 + }, + { + "key": "acronyms", + "similarity_score": 22.222222222222218 + } + ] +} \ No newline at end of file diff --git a/results_sunshinemix_modified_question_comparision%Test.json b/results_sunshinemix_modified_question_comparision%Test.json new file mode 100644 index 00000000..bb355fc1 --- /dev/null +++ b/results_sunshinemix_modified_question_comparision%Test.json @@ -0,0 +1,52 @@ +{ + "tests": [ + { + "key": "metric_usage", + "similarity_score": 100.0 + }, + { + "key": "lot_number", + "similarity_score": 100.0 + }, + { + "key": "two_language", + "similarity_score": 100.0 + }, + { + "key": "acronyms", + "similarity_score": 22.22 + }, + { + "key": "seller_guarantee", + "similarity_score": 22.22 + }, + { + "key": "name_of_fertiliser", + "similarity_score": 100.0 + }, + { + "key": "mixture_product_options", + "similarity_score": 22.22 + }, + { + "key": "address_of_the_registrant", + "similarity_score": 100.0 + }, + { + "key": "name_of_the_registrant", + "similarity_score": 100.0 + }, + { + "key": "weight", + "similarity_score": 100.0 + }, + { + "key": "good_metric_conversion", + "similarity_score": 100.0 + }, + { + "key": "measurement_unit", + "similarity_score": 100.0 + } + ] +} \ No newline at end of file diff --git a/results_sunshinemix_original_question_comparision%Test.json b/results_sunshinemix_original_question_comparision%Test.json new file mode 100644 index 00000000..1701e5c1 --- /dev/null +++ b/results_sunshinemix_original_question_comparision%Test.json @@ -0,0 +1,3 @@ +{ + "tests": [] +} \ No newline at end of file From 42b59f4b17c75cb89649f33a09ac7e39e8a5f731 Mon Sep 17 00:00:00 2001 From: samuel Pelletier-Evraire Date: Wed, 10 Apr 2024 10:32:59 -0400 Subject: [PATCH 02/16] save --- Tests/Responses/response_actiSol1.json | 29 ------------------- Tests/Responses/response_sunshine_mix.json | 19 ------------ Tests/testWithModifiedQuestion.py | 0 app.py | 8 ++--- results%Test.json | 0 ...good_responses_modified_question%Test.json | 2 +- ...good_responses_original_question%Test.json | 2 +- ...mix_modified_question_comparision%Tes.json | 2 +- ...ix_modified_question_comparision%Test.json | 2 +- ...ix_original_question_comparision%Test.json | 3 -- 10 files changed, 8 insertions(+), 59 deletions(-) delete mode 100644 Tests/Responses/response_actiSol1.json delete mode 100644 Tests/Responses/response_sunshine_mix.json delete mode 100644 Tests/testWithModifiedQuestion.py delete mode 100644 results%Test.json delete mode 100644 results_sunshinemix_original_question_comparision%Test.json diff --git a/Tests/Responses/response_actiSol1.json b/Tests/Responses/response_actiSol1.json deleted file mode 100644 index e10b5ec9..00000000 --- a/Tests/Responses/response_actiSol1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name_of_the_registrant": true, - "address_of_the_registrant": true, - "name_of_fertiliser": true, - "name_of_fertiliser_contain_term": true, - "mixture_product_options": true, - "direction_of_use_on_bag": true, - "direction_of_use_contain_option1": true, - "direction_of_use_contain_option2": "None", - "direction_of_use_contain_option3": "None", - "weight": true, - "measurement_unit": true, - "guaranteed_analysis": true, - "0%_garantees": true, - "active_ingredients_only":true, - "include_minimal_requirement": true, - "minimum_n": true, - "minimum_p2o5": true, - "contain_phosphate": false, - "minimum_k2o": true, - "secondary_nutrient": true, - "contain_organic_matter": true, - "necessary_precaution": true, - "label_misleading_information" :true, - "metric_usage": true, - "good_metric_conversion": true, - "lot_number":true, - "two_language": true -} \ No newline at end of file diff --git a/Tests/Responses/response_sunshine_mix.json b/Tests/Responses/response_sunshine_mix.json deleted file mode 100644 index 2cc7dcd7..00000000 --- a/Tests/Responses/response_sunshine_mix.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name_of_the_registrant": true, - "address_of_the_registrant": true, - "name_of_fertiliser": true, - "name_of_fertiliser_contain_term": true, - "mixture_product_options": true, - "direction_of_use_on_bag": true, - "direction_of_use_contain_option1": "None", - "direction_of_use_contain_option2": "None", - "direction_of_use_contain_option3": true, - "weight": true, - "measurement_unit": true, - "acronyms": true, - "metric_usage": true, - "seller_guarantee": true, - "good_metric_conversion": true, - "lot_number":true, - "two_language": true -} \ No newline at end of file diff --git a/Tests/testWithModifiedQuestion.py b/Tests/testWithModifiedQuestion.py deleted file mode 100644 index e69de29b..00000000 diff --git a/app.py b/app.py index 6797e07f..2039024f 100644 --- a/app.py +++ b/app.py @@ -175,11 +175,11 @@ def create_base_request(file): model = GenerativeModel("gemini-1.0-pro-vision-001") projectinit=vertexai.init(project="test-application-2-416219", location="northamerica-northeast1") #Original question -baseQuestions = generateRequest('Company_Image_Folder\\Acti_Sol1', model, projectinit, None, "Original_question") -baseQuestions = generateRequest('Company_Image_Folder\\Acti_Sol1', model, projectinit, baseQuestions, "Original_question") +baseQuestions = generateRequest('company_image_folder\\acti_sol1', model, projectinit, None, "original_question") +baseQuestions = generateRequest('company_image_folder\\acti_sol1', model, projectinit, baseQuestions, "original_question") # Modified question -baseQuestions = generateRequest('Company_Image_Folder\\Acti_Sol1', model, projectinit, None, "Modified_question") -baseQuestions = generateRequest('Company_Image_Folder\\Acti_Sol1', model, projectinit, baseQuestions, "Modified_question") +baseQuestions = generateRequest('company_image_folder\\acti_sol1', model, projectinit, None, "modified_question") +baseQuestions = generateRequest('company_image_folder\\acti_sol1', model, projectinit, baseQuestions, "modified_question") #generateRequest('Company_Image_Folder\Bio_Fleur', model, projectinit) #generateRequest('Company_Image_Folder\Bio_Fleur', model, projectinit) diff --git a/results%Test.json b/results%Test.json deleted file mode 100644 index e69de29b..00000000 diff --git a/results_good_responses_modified_question%Test.json b/results_good_responses_modified_question%Test.json index ec38de41..d12a7357 100644 --- a/results_good_responses_modified_question%Test.json +++ b/results_good_responses_modified_question%Test.json @@ -85,4 +85,4 @@ "similarity_score": 1.0 } ] -} \ No newline at end of file +} diff --git a/results_good_responses_original_question%Test.json b/results_good_responses_original_question%Test.json index 13f8b353..fcf3355d 100644 --- a/results_good_responses_original_question%Test.json +++ b/results_good_responses_original_question%Test.json @@ -89,4 +89,4 @@ "similarity_score": 1.0 } ] -} \ No newline at end of file +} diff --git a/results_sunshinemix_modified_question_comparision%Tes.json b/results_sunshinemix_modified_question_comparision%Tes.json index 2e9c8664..3e537d0c 100644 --- a/results_sunshinemix_modified_question_comparision%Tes.json +++ b/results_sunshinemix_modified_question_comparision%Tes.json @@ -49,4 +49,4 @@ "similarity_score": 22.222222222222218 } ] -} \ No newline at end of file +} diff --git a/results_sunshinemix_modified_question_comparision%Test.json b/results_sunshinemix_modified_question_comparision%Test.json index bb355fc1..7b5e9c4f 100644 --- a/results_sunshinemix_modified_question_comparision%Test.json +++ b/results_sunshinemix_modified_question_comparision%Test.json @@ -49,4 +49,4 @@ "similarity_score": 100.0 } ] -} \ No newline at end of file +} diff --git a/results_sunshinemix_original_question_comparision%Test.json b/results_sunshinemix_original_question_comparision%Test.json deleted file mode 100644 index 1701e5c1..00000000 --- a/results_sunshinemix_original_question_comparision%Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "tests": [] -} \ No newline at end of file From 341166adc3e6d1d05a2d0ac4d3fcb729b04e08d6 Mon Sep 17 00:00:00 2001 From: samuel Pelletier-Evraire Date: Wed, 10 Apr 2024 10:54:59 -0400 Subject: [PATCH 03/16] issue #6: Removing all test file --- .../Acti_Sol1/2024-04-04_12h33m43s_test.json | 40 ---------------- .../Acti_Sol1/2024-04-04_12h41m25s_test.json | 40 ---------------- .../2024-04-04_13h15m00s_test.json | 46 ------------------- .../2024-04-04_13h22m44s_test.json | 46 ------------------- .../2024-04-04_13h24m44s_test.json | 46 ------------------- .../2024-04-04_14h28m40s_test.json | 46 ------------------- .../Acti_Sol1/2024-04-04_12h33m28s_test.json | 44 ------------------ .../Acti_Sol1/2024-04-04_12h41m09s_test.json | 44 ------------------ .../2024-04-04_13h24m29s_test.json | 1 - .../2024-04-04_14h28m26s_test.json | 1 - 10 files changed, 354 deletions(-) delete mode 100644 Tests/TestsResult/Modified_question/Acti_Sol1/2024-04-04_12h33m43s_test.json delete mode 100644 Tests/TestsResult/Modified_question/Acti_Sol1/2024-04-04_12h41m25s_test.json delete mode 100644 Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h15m00s_test.json delete mode 100644 Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h22m44s_test.json delete mode 100644 Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h24m44s_test.json delete mode 100644 Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_14h28m40s_test.json delete mode 100644 Tests/TestsResult/Original_question/Acti_Sol1/2024-04-04_12h33m28s_test.json delete mode 100644 Tests/TestsResult/Original_question/Acti_Sol1/2024-04-04_12h41m09s_test.json delete mode 100644 Tests/TestsResult/Original_question/sunshine_mix/2024-04-04_13h24m29s_test.json delete mode 100644 Tests/TestsResult/Original_question/sunshine_mix/2024-04-04_14h28m26s_test.json diff --git a/Tests/TestsResult/Modified_question/Acti_Sol1/2024-04-04_12h33m43s_test.json b/Tests/TestsResult/Modified_question/Acti_Sol1/2024-04-04_12h33m43s_test.json deleted file mode 100644 index 83be052b..00000000 --- a/Tests/TestsResult/Modified_question/Acti_Sol1/2024-04-04_12h33m43s_test.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name_of_the_registrant": "Usine Agro-Sol Enr.", - "address_of_the_registrant": "1345, rang 3 O. de Wendover, Notre-Dame-du-Bon-Conseil, Quebec, Canada, J0C 1V0", - "name_of_fertiliser": "Mother Hen Tomatoes and vegetables 4-6-8", - "weight": "2.5 kg", - "measurement_unit": "kg", - "guaranteed_analysis": true, - "0%_garantees": false, - "active_ingredients_only": true, - "include_minimal_requirement": true, - "minimum_n": "4.0 %", - "minimum_p2o5": "6.0 %", - "contain_phosphate": "Total phosphoric acid as %: 8.5%, avalaible phosphoric acid as %: 6.0%", - "minimum_k2o": "8.0 %", - "secondary_nutrient": "Calcium (Ca): 1.8 %", - "proponent_not_required": false, - "written_full": true, - "microorganism_must_contain": false, - "complex_microorganisms_community": false, - "contain_organic_matter": false, - "other_active_ingredient": false, - "less_then_0.001%": false, - "guaranteed_analysis_contain_active_pesticide_ingredient": false, - "minimum_%_active_ingredient_mixture/product": false, - "minimum_%_active_ingredient_final_treated_product": false, - "necessary_precaution": true, - "allergen": false, - "growing_medium_precautionary_statement": false, - "label_misleading_information": false, - "acronyms": false, - "metric_usage": true, - "good_metric_conversion": true, - "seller_guarantee": false, - "lot_number": "2023-03-08", - "two_language": true, - "contain_claim_of_definition_of_pest": false, - "registered_polymer": false, - "polymer_precautionary_statement": false, - "conform_direction_of_use": true -} \ No newline at end of file diff --git a/Tests/TestsResult/Modified_question/Acti_Sol1/2024-04-04_12h41m25s_test.json b/Tests/TestsResult/Modified_question/Acti_Sol1/2024-04-04_12h41m25s_test.json deleted file mode 100644 index 83be052b..00000000 --- a/Tests/TestsResult/Modified_question/Acti_Sol1/2024-04-04_12h41m25s_test.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name_of_the_registrant": "Usine Agro-Sol Enr.", - "address_of_the_registrant": "1345, rang 3 O. de Wendover, Notre-Dame-du-Bon-Conseil, Quebec, Canada, J0C 1V0", - "name_of_fertiliser": "Mother Hen Tomatoes and vegetables 4-6-8", - "weight": "2.5 kg", - "measurement_unit": "kg", - "guaranteed_analysis": true, - "0%_garantees": false, - "active_ingredients_only": true, - "include_minimal_requirement": true, - "minimum_n": "4.0 %", - "minimum_p2o5": "6.0 %", - "contain_phosphate": "Total phosphoric acid as %: 8.5%, avalaible phosphoric acid as %: 6.0%", - "minimum_k2o": "8.0 %", - "secondary_nutrient": "Calcium (Ca): 1.8 %", - "proponent_not_required": false, - "written_full": true, - "microorganism_must_contain": false, - "complex_microorganisms_community": false, - "contain_organic_matter": false, - "other_active_ingredient": false, - "less_then_0.001%": false, - "guaranteed_analysis_contain_active_pesticide_ingredient": false, - "minimum_%_active_ingredient_mixture/product": false, - "minimum_%_active_ingredient_final_treated_product": false, - "necessary_precaution": true, - "allergen": false, - "growing_medium_precautionary_statement": false, - "label_misleading_information": false, - "acronyms": false, - "metric_usage": true, - "good_metric_conversion": true, - "seller_guarantee": false, - "lot_number": "2023-03-08", - "two_language": true, - "contain_claim_of_definition_of_pest": false, - "registered_polymer": false, - "polymer_precautionary_statement": false, - "conform_direction_of_use": true -} \ No newline at end of file diff --git a/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h15m00s_test.json b/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h15m00s_test.json deleted file mode 100644 index c4f0c843..00000000 --- a/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h15m00s_test.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name_of_the_registrant": "Sun Gro Horticulture Canada Ltd.", - "address_of_the_registrant": "5230 Beach Rd Box 188\nSeba Beach AB T0E 2B0", - "name_of_fertiliser": "SUNSHINE MIX #4", - "suffix_pesticide": false, - "registration_number": false, - "mixture_product_options": false, - "seed_treated_fertilizer_supplement": false, - "include_tank_mixing": true, - "weight": "84.9 L (3 cu. ft.)", - "measurement_unit": true, - "guaranteed_analysis": true, - "0%_garantees": false, - "active_ingredients_only": false, - "include_minimal_requirement": true, - "minimum_n": "0.01%", - "minimum_p2o5": "0.02%", - "lawn_turf_low_phosphate_direction_of_use": false, - "contain_phosphate": "Total phosphoric acid as %: 0.02%\navalaible phosphoric acid as %: 0.02%", - "minimum_k2o": "0.04%", - "secondary_nutrient": "Calcium (Ca): 0.01%\nMagnesium (Mg): 0.005%\nSulphur (S): 0.01%", - "proponent_not_required": false, - "written_full": true, - "microorganism_must_contain": false, - "complex_microorganisms_community": false, - "contain_organic_matter": false, - "other_active_ingredient": false, - "less_then_0.001%": false, - "guaranteed_analysis_contain_active_pesticide_ingredient": false, - "minimum_%_active_ingredient_mixture/product": false, - "minimum_%_active_ingredient_final_treated_product": false, - "necessary_precaution": true, - "allergen": false, - "growing_medium_precautionary_statement": false, - "label_misleading_information": false, - "acronyms": false, - "metric_usage": true, - "good_metric_conversion": true, - "seller_guarantee": false, - "lot_number": "23-66-32", - "two_language": true, - "contain_claim_of_definition_of_pest": false, - "registered_polymer": false, - "polymer_precautionary_statement": false, - "conform_direction_of_use": false -} \ No newline at end of file diff --git a/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h22m44s_test.json b/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h22m44s_test.json deleted file mode 100644 index c4f0c843..00000000 --- a/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h22m44s_test.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name_of_the_registrant": "Sun Gro Horticulture Canada Ltd.", - "address_of_the_registrant": "5230 Beach Rd Box 188\nSeba Beach AB T0E 2B0", - "name_of_fertiliser": "SUNSHINE MIX #4", - "suffix_pesticide": false, - "registration_number": false, - "mixture_product_options": false, - "seed_treated_fertilizer_supplement": false, - "include_tank_mixing": true, - "weight": "84.9 L (3 cu. ft.)", - "measurement_unit": true, - "guaranteed_analysis": true, - "0%_garantees": false, - "active_ingredients_only": false, - "include_minimal_requirement": true, - "minimum_n": "0.01%", - "minimum_p2o5": "0.02%", - "lawn_turf_low_phosphate_direction_of_use": false, - "contain_phosphate": "Total phosphoric acid as %: 0.02%\navalaible phosphoric acid as %: 0.02%", - "minimum_k2o": "0.04%", - "secondary_nutrient": "Calcium (Ca): 0.01%\nMagnesium (Mg): 0.005%\nSulphur (S): 0.01%", - "proponent_not_required": false, - "written_full": true, - "microorganism_must_contain": false, - "complex_microorganisms_community": false, - "contain_organic_matter": false, - "other_active_ingredient": false, - "less_then_0.001%": false, - "guaranteed_analysis_contain_active_pesticide_ingredient": false, - "minimum_%_active_ingredient_mixture/product": false, - "minimum_%_active_ingredient_final_treated_product": false, - "necessary_precaution": true, - "allergen": false, - "growing_medium_precautionary_statement": false, - "label_misleading_information": false, - "acronyms": false, - "metric_usage": true, - "good_metric_conversion": true, - "seller_guarantee": false, - "lot_number": "23-66-32", - "two_language": true, - "contain_claim_of_definition_of_pest": false, - "registered_polymer": false, - "polymer_precautionary_statement": false, - "conform_direction_of_use": false -} \ No newline at end of file diff --git a/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h24m44s_test.json b/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h24m44s_test.json deleted file mode 100644 index c4f0c843..00000000 --- a/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_13h24m44s_test.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name_of_the_registrant": "Sun Gro Horticulture Canada Ltd.", - "address_of_the_registrant": "5230 Beach Rd Box 188\nSeba Beach AB T0E 2B0", - "name_of_fertiliser": "SUNSHINE MIX #4", - "suffix_pesticide": false, - "registration_number": false, - "mixture_product_options": false, - "seed_treated_fertilizer_supplement": false, - "include_tank_mixing": true, - "weight": "84.9 L (3 cu. ft.)", - "measurement_unit": true, - "guaranteed_analysis": true, - "0%_garantees": false, - "active_ingredients_only": false, - "include_minimal_requirement": true, - "minimum_n": "0.01%", - "minimum_p2o5": "0.02%", - "lawn_turf_low_phosphate_direction_of_use": false, - "contain_phosphate": "Total phosphoric acid as %: 0.02%\navalaible phosphoric acid as %: 0.02%", - "minimum_k2o": "0.04%", - "secondary_nutrient": "Calcium (Ca): 0.01%\nMagnesium (Mg): 0.005%\nSulphur (S): 0.01%", - "proponent_not_required": false, - "written_full": true, - "microorganism_must_contain": false, - "complex_microorganisms_community": false, - "contain_organic_matter": false, - "other_active_ingredient": false, - "less_then_0.001%": false, - "guaranteed_analysis_contain_active_pesticide_ingredient": false, - "minimum_%_active_ingredient_mixture/product": false, - "minimum_%_active_ingredient_final_treated_product": false, - "necessary_precaution": true, - "allergen": false, - "growing_medium_precautionary_statement": false, - "label_misleading_information": false, - "acronyms": false, - "metric_usage": true, - "good_metric_conversion": true, - "seller_guarantee": false, - "lot_number": "23-66-32", - "two_language": true, - "contain_claim_of_definition_of_pest": false, - "registered_polymer": false, - "polymer_precautionary_statement": false, - "conform_direction_of_use": false -} \ No newline at end of file diff --git a/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_14h28m40s_test.json b/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_14h28m40s_test.json deleted file mode 100644 index c4f0c843..00000000 --- a/Tests/TestsResult/Modified_question/sunshine_mix/2024-04-04_14h28m40s_test.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name_of_the_registrant": "Sun Gro Horticulture Canada Ltd.", - "address_of_the_registrant": "5230 Beach Rd Box 188\nSeba Beach AB T0E 2B0", - "name_of_fertiliser": "SUNSHINE MIX #4", - "suffix_pesticide": false, - "registration_number": false, - "mixture_product_options": false, - "seed_treated_fertilizer_supplement": false, - "include_tank_mixing": true, - "weight": "84.9 L (3 cu. ft.)", - "measurement_unit": true, - "guaranteed_analysis": true, - "0%_garantees": false, - "active_ingredients_only": false, - "include_minimal_requirement": true, - "minimum_n": "0.01%", - "minimum_p2o5": "0.02%", - "lawn_turf_low_phosphate_direction_of_use": false, - "contain_phosphate": "Total phosphoric acid as %: 0.02%\navalaible phosphoric acid as %: 0.02%", - "minimum_k2o": "0.04%", - "secondary_nutrient": "Calcium (Ca): 0.01%\nMagnesium (Mg): 0.005%\nSulphur (S): 0.01%", - "proponent_not_required": false, - "written_full": true, - "microorganism_must_contain": false, - "complex_microorganisms_community": false, - "contain_organic_matter": false, - "other_active_ingredient": false, - "less_then_0.001%": false, - "guaranteed_analysis_contain_active_pesticide_ingredient": false, - "minimum_%_active_ingredient_mixture/product": false, - "minimum_%_active_ingredient_final_treated_product": false, - "necessary_precaution": true, - "allergen": false, - "growing_medium_precautionary_statement": false, - "label_misleading_information": false, - "acronyms": false, - "metric_usage": true, - "good_metric_conversion": true, - "seller_guarantee": false, - "lot_number": "23-66-32", - "two_language": true, - "contain_claim_of_definition_of_pest": false, - "registered_polymer": false, - "polymer_precautionary_statement": false, - "conform_direction_of_use": false -} \ No newline at end of file diff --git a/Tests/TestsResult/Original_question/Acti_Sol1/2024-04-04_12h33m28s_test.json b/Tests/TestsResult/Original_question/Acti_Sol1/2024-04-04_12h33m28s_test.json deleted file mode 100644 index 1252d331..00000000 --- a/Tests/TestsResult/Original_question/Acti_Sol1/2024-04-04_12h33m28s_test.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name_of_the_registrant": "Acti-Sol", - "address_of_the_registrant": "1303 Rang Ste-Anne, Notre-Dame-du-Bon-Conseil, Quebec, Canada, J0C 1V0", - "name_of_fertiliser": "Mother Hen Tomatoes and Vegetables", - "registration_number": "80062444", - "mixture_product_options": "Record keeping option", - "weight": "2.5 kg", - "measurement_unit": "kg", - "guaranteed_analysis": true, - "0%_garantees": false, - "active_ingredients_only": true, - "include_minimal_requirement": false, - "minimum_n": "4.0%", - "minimum_p2o5": "6.0%", - "minimum_k2o": "8.0%", - "secondary_nutrient": false, - "contain_phosphate": true, - "minimum_total_phosphoric_acid": "8.0%", - "minimum_available_phosphoric_acid": "6.0%", - "proponent_not_required": false, - "written_full": true, - "microorganism_must_contain": false, - "complex_microorganisms_community": false, - "contain_organic_matter": false, - "other_active_ingredient": false, - "less_then_0.001%": false, - "guaranteed_analysis_contain_active_pesticide_ingredient": false, - "minimum_%_active_ingredient_mixture/product": false, - "minimum_%_active_ingredient_final_treated_product": false, - "necessary_precaution": false, - "allergen": false, - "growing_medium_precautionary_statement": false, - "label_misleading_information": false, - "acronyms": false, - "metric_usage": true, - "good_metric_conversion": true, - "seller_guarantee": false, - "lot_number": false, - "two_language": true, - "contain_claim_of_definition_of_pest": false, - "registered_polymer": false, - "polymer_precautionary_statement": false, - "conform_direction_of_use": false -} \ No newline at end of file diff --git a/Tests/TestsResult/Original_question/Acti_Sol1/2024-04-04_12h41m09s_test.json b/Tests/TestsResult/Original_question/Acti_Sol1/2024-04-04_12h41m09s_test.json deleted file mode 100644 index 1252d331..00000000 --- a/Tests/TestsResult/Original_question/Acti_Sol1/2024-04-04_12h41m09s_test.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name_of_the_registrant": "Acti-Sol", - "address_of_the_registrant": "1303 Rang Ste-Anne, Notre-Dame-du-Bon-Conseil, Quebec, Canada, J0C 1V0", - "name_of_fertiliser": "Mother Hen Tomatoes and Vegetables", - "registration_number": "80062444", - "mixture_product_options": "Record keeping option", - "weight": "2.5 kg", - "measurement_unit": "kg", - "guaranteed_analysis": true, - "0%_garantees": false, - "active_ingredients_only": true, - "include_minimal_requirement": false, - "minimum_n": "4.0%", - "minimum_p2o5": "6.0%", - "minimum_k2o": "8.0%", - "secondary_nutrient": false, - "contain_phosphate": true, - "minimum_total_phosphoric_acid": "8.0%", - "minimum_available_phosphoric_acid": "6.0%", - "proponent_not_required": false, - "written_full": true, - "microorganism_must_contain": false, - "complex_microorganisms_community": false, - "contain_organic_matter": false, - "other_active_ingredient": false, - "less_then_0.001%": false, - "guaranteed_analysis_contain_active_pesticide_ingredient": false, - "minimum_%_active_ingredient_mixture/product": false, - "minimum_%_active_ingredient_final_treated_product": false, - "necessary_precaution": false, - "allergen": false, - "growing_medium_precautionary_statement": false, - "label_misleading_information": false, - "acronyms": false, - "metric_usage": true, - "good_metric_conversion": true, - "seller_guarantee": false, - "lot_number": false, - "two_language": true, - "contain_claim_of_definition_of_pest": false, - "registered_polymer": false, - "polymer_precautionary_statement": false, - "conform_direction_of_use": false -} \ No newline at end of file diff --git a/Tests/TestsResult/Original_question/sunshine_mix/2024-04-04_13h24m29s_test.json b/Tests/TestsResult/Original_question/sunshine_mix/2024-04-04_13h24m29s_test.json deleted file mode 100644 index 9e26dfee..00000000 --- a/Tests/TestsResult/Original_question/sunshine_mix/2024-04-04_13h24m29s_test.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Tests/TestsResult/Original_question/sunshine_mix/2024-04-04_14h28m26s_test.json b/Tests/TestsResult/Original_question/sunshine_mix/2024-04-04_14h28m26s_test.json deleted file mode 100644 index 9e26dfee..00000000 --- a/Tests/TestsResult/Original_question/sunshine_mix/2024-04-04_14h28m26s_test.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file From 2fc80c6fe3080f8ec1a76e3b5b6f269581c2a1e3 Mon Sep 17 00:00:00 2001 From: samuel Pelletier-Evraire Date: Wed, 10 Apr 2024 10:56:08 -0400 Subject: [PATCH 04/16] issue #6: Deleting all result file --- ...good_responses_modified_question%Test.json | 88 ------------------ ...good_responses_original_question%Test.json | 92 ------------------- ...mix_modified_question_comparision%Tes.json | 52 ----------- ...ix_modified_question_comparision%Test.json | 52 ----------- 4 files changed, 284 deletions(-) delete mode 100644 results_good_responses_modified_question%Test.json delete mode 100644 results_good_responses_original_question%Test.json delete mode 100644 results_sunshinemix_modified_question_comparision%Tes.json delete mode 100644 results_sunshinemix_modified_question_comparision%Test.json diff --git a/results_good_responses_modified_question%Test.json b/results_good_responses_modified_question%Test.json deleted file mode 100644 index d12a7357..00000000 --- a/results_good_responses_modified_question%Test.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "tests": [ - { - "key": "necessary_precaution", - "similarity_score": 1.0 - }, - { - "key": "label_misleading_information", - "similarity_score": 0.2222222222222222 - }, - { - "key": "minimum_p2o5", - "similarity_score": 100.0 - }, - { - "key": "weight", - "similarity_score": 100.0 - }, - { - "key": "secondary_nutrient", - "similarity_score": 100.0 - }, - { - "key": "0%_garantees", - "similarity_score": 0.2222222222222222 - }, - { - "key": "include_minimal_requirement", - "similarity_score": 1.0 - }, - { - "key": "address_of_the_registrant", - "similarity_score": 100.0 - }, - { - "key": "contain_phosphate", - "similarity_score": 22.22222222222222 - }, - { - "key": "name_of_fertiliser", - "similarity_score": 100.0 - }, - { - "key": "minimum_k2o", - "similarity_score": 100.0 - }, - { - "key": "active_ingredients_only", - "similarity_score": 1.0 - }, - { - "key": "contain_organic_matter", - "similarity_score": 0.2222222222222222 - }, - { - "key": "lot_number", - "similarity_score": 100.0 - }, - { - "key": "two_language", - "similarity_score": 1.0 - }, - { - "key": "good_metric_conversion", - "similarity_score": 1.0 - }, - { - "key": "measurement_unit", - "similarity_score": 100.0 - }, - { - "key": "minimum_n", - "similarity_score": 100.0 - }, - { - "key": "metric_usage", - "similarity_score": 1.0 - }, - { - "key": "name_of_the_registrant", - "similarity_score": 100.0 - }, - { - "key": "guaranteed_analysis", - "similarity_score": 1.0 - } - ] -} diff --git a/results_good_responses_original_question%Test.json b/results_good_responses_original_question%Test.json deleted file mode 100644 index fcf3355d..00000000 --- a/results_good_responses_original_question%Test.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "tests": [ - { - "key": "necessary_precaution", - "similarity_score": 0.2222222222222222 - }, - { - "key": "label_misleading_information", - "similarity_score": 0.2222222222222222 - }, - { - "key": "minimum_p2o5", - "similarity_score": 100.0 - }, - { - "key": "mixture_product_options", - "similarity_score": 100.0 - }, - { - "key": "weight", - "similarity_score": 100.0 - }, - { - "key": "secondary_nutrient", - "similarity_score": 0.2222222222222222 - }, - { - "key": "0%_garantees", - "similarity_score": 0.2222222222222222 - }, - { - "key": "include_minimal_requirement", - "similarity_score": 0.2222222222222222 - }, - { - "key": "address_of_the_registrant", - "similarity_score": 100.0 - }, - { - "key": "contain_phosphate", - "similarity_score": 0.2222222222222222 - }, - { - "key": "name_of_fertiliser", - "similarity_score": 100.0 - }, - { - "key": "minimum_k2o", - "similarity_score": 100.0 - }, - { - "key": "active_ingredients_only", - "similarity_score": 1.0 - }, - { - "key": "contain_organic_matter", - "similarity_score": 0.2222222222222222 - }, - { - "key": "lot_number", - "similarity_score": 0.2222222222222222 - }, - { - "key": "two_language", - "similarity_score": 1.0 - }, - { - "key": "good_metric_conversion", - "similarity_score": 1.0 - }, - { - "key": "measurement_unit", - "similarity_score": 100.0 - }, - { - "key": "minimum_n", - "similarity_score": 100.0 - }, - { - "key": "metric_usage", - "similarity_score": 1.0 - }, - { - "key": "name_of_the_registrant", - "similarity_score": 100.0 - }, - { - "key": "guaranteed_analysis", - "similarity_score": 1.0 - } - ] -} diff --git a/results_sunshinemix_modified_question_comparision%Tes.json b/results_sunshinemix_modified_question_comparision%Tes.json deleted file mode 100644 index 3e537d0c..00000000 --- a/results_sunshinemix_modified_question_comparision%Tes.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "tests": [ - { - "key": "mixture_product_options", - "similarity_score": 22.222222222222218 - }, - { - "key": "name_of_the_registrant", - "similarity_score": 100.0 - }, - { - "key": "measurement_unit", - "similarity_score": 100.0 - }, - { - "key": "seller_guarantee", - "similarity_score": 22.222222222222218 - }, - { - "key": "metric_usage", - "similarity_score": 100.0 - }, - { - "key": "lot_number", - "similarity_score": 100.0 - }, - { - "key": "name_of_fertiliser", - "similarity_score": 100.0 - }, - { - "key": "address_of_the_registrant", - "similarity_score": 100.0 - }, - { - "key": "two_language", - "similarity_score": 100.0 - }, - { - "key": "weight", - "similarity_score": 100.0 - }, - { - "key": "good_metric_conversion", - "similarity_score": 100.0 - }, - { - "key": "acronyms", - "similarity_score": 22.222222222222218 - } - ] -} diff --git a/results_sunshinemix_modified_question_comparision%Test.json b/results_sunshinemix_modified_question_comparision%Test.json deleted file mode 100644 index 7b5e9c4f..00000000 --- a/results_sunshinemix_modified_question_comparision%Test.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "tests": [ - { - "key": "metric_usage", - "similarity_score": 100.0 - }, - { - "key": "lot_number", - "similarity_score": 100.0 - }, - { - "key": "two_language", - "similarity_score": 100.0 - }, - { - "key": "acronyms", - "similarity_score": 22.22 - }, - { - "key": "seller_guarantee", - "similarity_score": 22.22 - }, - { - "key": "name_of_fertiliser", - "similarity_score": 100.0 - }, - { - "key": "mixture_product_options", - "similarity_score": 22.22 - }, - { - "key": "address_of_the_registrant", - "similarity_score": 100.0 - }, - { - "key": "name_of_the_registrant", - "similarity_score": 100.0 - }, - { - "key": "weight", - "similarity_score": 100.0 - }, - { - "key": "good_metric_conversion", - "similarity_score": 100.0 - }, - { - "key": "measurement_unit", - "similarity_score": 100.0 - } - ] -} From c968d5eeabfafe0b806536376d5203d88b21785d Mon Sep 17 00:00:00 2001 From: Samuel Pelletier Evraire Date: Wed, 10 Apr 2024 11:16:04 -0400 Subject: [PATCH 05/16] issue #6: Update README.md --- README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b58542b3..08da65bb 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,19 @@ -# harvester-prototype +# Harvester Prototype (FertiScan) -This repository is for the prototyping of the project Harvester. +## Overview Description +The Harvester project, hosted on Azure DevOps, represents a significant advancement in fertilizer bag inspection. The primary goal of this prototype is to test and validate various potential solutions that could be integrated into the final project. The AI-Lab team, utilizing unit tests, strives to determine the best approach to address issues associated with fertilizer bag inspection. + +## Key Features + +**Gemini Vertex API:** An application programming interface designed to simulate human conversation, capable of answering questions and processing a large number of images. + +**Testing Process:** Rigorous testing is conducted to demonstrate that the Gemini Vertex API, created by Google, is the appropriate method for the Harvester project. It meets various criteria and achieves two main objectives: reading labels during recording and identifying differences with bags analyzed by inspectors. + +## Potential Advantages + +**Increased Efficiency:** By automating fertilizer bag inspection, the project aims to increase the efficiency and accuracy of the inspection process. + +**Advanced Analysis:** Through the integration of the Gemini Vertex API, the system can analyze fertilizer bag labels more thoroughly, identifying not only basic information but also subtle differences that may escape human inspection. + +## Future Outlook +The Harvester prototype is a crucial step toward realizing a comprehensive automated inspection system. With continuous testing and improvements, it has the potential to transform the way fertilizer bag inspections are conducted, bringing an advanced technological solution to the agricultural sector. From 1228bcdf4bea33f91412593b8c73ad245f387dfc Mon Sep 17 00:00:00 2001 From: samuel Pelletier-Evraire Date: Wed, 10 Apr 2024 11:25:18 -0400 Subject: [PATCH 06/16] issue # 6: Modifying README line lenght --- README.md | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 08da65bb..c46efbd1 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,37 @@ # Harvester Prototype (FertiScan) ## Overview Description -The Harvester project, hosted on Azure DevOps, represents a significant advancement in fertilizer bag inspection. The primary goal of this prototype is to test and validate various potential solutions that could be integrated into the final project. The AI-Lab team, utilizing unit tests, strives to determine the best approach to address issues associated with fertilizer bag inspection. +The Harvester project, hosted on Azure DevOps, represents a significant +advancement in fertilizer bag inspection. The primary goal of this prototype is +to test and validate various potential solutions that could be integrated into +the final project. The AI-Lab team, utilizing unit tests, strives to determine +the best approach to address issues associated with fertilizer bag inspection. ## Key Features -**Gemini Vertex API:** An application programming interface designed to simulate human conversation, capable of answering questions and processing a large number of images. +**Gemini Vertex API:** An application programming interface designed to +simulate human conversation, capable of answering questions and processing +a large number of images. -**Testing Process:** Rigorous testing is conducted to demonstrate that the Gemini Vertex API, created by Google, is the appropriate method for the Harvester project. It meets various criteria and achieves two main objectives: reading labels during recording and identifying differences with bags analyzed by inspectors. +**Testing Process:** Rigorous testing is conducted to demonstrate that +the Gemini Vertex API, created by Google, is the appropriate method for the +Harvester project. +It meets various criteria and achieves two main objectives: +reading labels during recording and identifying differences with bags analyzed +by inspectors. ## Potential Advantages -**Increased Efficiency:** By automating fertilizer bag inspection, the project aims to increase the efficiency and accuracy of the inspection process. +**Increased Efficiency:** By automating fertilizer bag inspection, the project +aims to increase the efficiency and accuracy of the inspection process. -**Advanced Analysis:** Through the integration of the Gemini Vertex API, the system can analyze fertilizer bag labels more thoroughly, identifying not only basic information but also subtle differences that may escape human inspection. +**Advanced Analysis:** Through the integration of the Gemini Vertex API, the +system can analyze fertilizer bag labels more thoroughly, identifying not only +basic information but also subtle differences that may escape human inspection. ## Future Outlook -The Harvester prototype is a crucial step toward realizing a comprehensive automated inspection system. With continuous testing and improvements, it has the potential to transform the way fertilizer bag inspections are conducted, bringing an advanced technological solution to the agricultural sector. +The Harvester prototype is a crucial step toward realizing a +comprehensive automated inspection system. With continuous testing and +improvements, it has the potential to transform the way fertilizer bag +inspections are conducted, bringing an advanced technological solution +to the agricultural sector. From f9d3893ad38fc5d2e1a7ce87b1db3cc8bb703022 Mon Sep 17 00:00:00 2001 From: samuel Pelletier-Evraire Date: Wed, 10 Apr 2024 11:34:15 -0400 Subject: [PATCH 07/16] issue #6: modifying readme file for the workflow --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c46efbd1..5f9a1d96 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ + # Harvester Prototype (FertiScan) ## Overview Description + +--- The Harvester project, hosted on Azure DevOps, represents a significant advancement in fertilizer bag inspection. The primary goal of this prototype is to test and validate various potential solutions that could be integrated into @@ -9,10 +12,10 @@ the best approach to address issues associated with fertilizer bag inspection. ## Key Features +--- **Gemini Vertex API:** An application programming interface designed to simulate human conversation, capable of answering questions and processing -a large number of images. - +a large number of images.
**Testing Process:** Rigorous testing is conducted to demonstrate that the Gemini Vertex API, created by Google, is the appropriate method for the Harvester project. @@ -22,14 +25,15 @@ by inspectors. ## Potential Advantages +--- **Increased Efficiency:** By automating fertilizer bag inspection, the project -aims to increase the efficiency and accuracy of the inspection process. - +aims to increase the efficiency and accuracy of the inspection process.
**Advanced Analysis:** Through the integration of the Gemini Vertex API, the system can analyze fertilizer bag labels more thoroughly, identifying not only basic information but also subtle differences that may escape human inspection. ## Future Outlook + The Harvester prototype is a crucial step toward realizing a comprehensive automated inspection system. With continuous testing and improvements, it has the potential to transform the way fertilizer bag From b16af07fad41dd682344449fdf549fc92be95873 Mon Sep 17 00:00:00 2001 From: samuel Pelletier-Evraire Date: Wed, 10 Apr 2024 11:44:21 -0400 Subject: [PATCH 08/16] issue #6: Removing br in markdown for convention --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5f9a1d96..7e52ac4e 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ the best approach to address issues associated with fertilizer bag inspection. --- **Gemini Vertex API:** An application programming interface designed to simulate human conversation, capable of answering questions and processing -a large number of images.
+a large number of images. **Testing Process:** Rigorous testing is conducted to demonstrate that the Gemini Vertex API, created by Google, is the appropriate method for the Harvester project. @@ -27,7 +27,7 @@ by inspectors. --- **Increased Efficiency:** By automating fertilizer bag inspection, the project -aims to increase the efficiency and accuracy of the inspection process.
+aims to increase the efficiency and accuracy of the inspection process. **Advanced Analysis:** Through the integration of the Gemini Vertex API, the system can analyze fertilizer bag labels more thoroughly, identifying not only basic information but also subtle differences that may escape human inspection. From 5f06f49c92c66d8c8504aad32e51e59644bc6a02 Mon Sep 17 00:00:00 2001 From: samuel Pelletier-Evraire Date: Wed, 10 Apr 2024 11:45:02 -0400 Subject: [PATCH 09/16] issue #6: Modifying the overview Description --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7e52ac4e..aaf5d0a6 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## Overview Description --- -The Harvester project, hosted on Azure DevOps, represents a significant +The Harvester project, represents a significant advancement in fertilizer bag inspection. The primary goal of this prototype is to test and validate various potential solutions that could be integrated into the final project. The AI-Lab team, utilizing unit tests, strives to determine From d2e1dc2120fa9c477e07eb6ed5d46c58012cb84c Mon Sep 17 00:00:00 2001 From: samuel Pelletier-Evraire Date: Wed, 10 Apr 2024 12:09:39 -0400 Subject: [PATCH 10/16] issue #6:Refactor README.md for improved readability and consistency --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index aaf5d0a6..01c8ce7a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ # Harvester Prototype (FertiScan) ## Overview Description - --- The Harvester project, represents a significant advancement in fertilizer bag inspection. The primary goal of this prototype is @@ -11,7 +10,6 @@ the final project. The AI-Lab team, utilizing unit tests, strives to determine the best approach to address issues associated with fertilizer bag inspection. ## Key Features - --- **Gemini Vertex API:** An application programming interface designed to simulate human conversation, capable of answering questions and processing @@ -24,7 +22,6 @@ reading labels during recording and identifying differences with bags analyzed by inspectors. ## Potential Advantages - --- **Increased Efficiency:** By automating fertilizer bag inspection, the project aims to increase the efficiency and accuracy of the inspection process. @@ -33,7 +30,6 @@ system can analyze fertilizer bag labels more thoroughly, identifying not only basic information but also subtle differences that may escape human inspection. ## Future Outlook - The Harvester prototype is a crucial step toward realizing a comprehensive automated inspection system. With continuous testing and improvements, it has the potential to transform the way fertilizer bag From 7bae72dff0b2c0c9d66fa113e7ed88d69043cd01 Mon Sep 17 00:00:00 2001 From: samuel Pelletier-Evraire Date: Wed, 10 Apr 2024 12:14:44 -0400 Subject: [PATCH 11/16] issue #6: removing space at the end of the line --- README.md | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 01c8ce7a..848106dd 100644 --- a/README.md +++ b/README.md @@ -2,36 +2,40 @@ # Harvester Prototype (FertiScan) ## Overview Description + --- -The Harvester project, represents a significant +The Harvester project, represents a significant advancement in fertilizer bag inspection. The primary goal of this prototype is -to test and validate various potential solutions that could be integrated into -the final project. The AI-Lab team, utilizing unit tests, strives to determine +to test and validate various potential solutions that could be integrated into +the final project. The AI-Lab team, utilizing unit tests, strives to determine the best approach to address issues associated with fertilizer bag inspection. ## Key Features + --- -**Gemini Vertex API:** An application programming interface designed to -simulate human conversation, capable of answering questions and processing +**Gemini Vertex API:** An application programming interface designed to +simulate human conversation, capable of answering questions and processing a large number of images. **Testing Process:** Rigorous testing is conducted to demonstrate that -the Gemini Vertex API, created by Google, is the appropriate method for the -Harvester project. -It meets various criteria and achieves two main objectives: -reading labels during recording and identifying differences with bags analyzed +the Gemini Vertex API, created by Google, is the appropriate method for the +Harvester project. +It meets various criteria and achieves two main objectives: +reading labels during recording and identifying differences with bags analyzed by inspectors. ## Potential Advantages + --- -**Increased Efficiency:** By automating fertilizer bag inspection, the project +**Increased Efficiency:** By automating fertilizer bag inspection, the project aims to increase the efficiency and accuracy of the inspection process. -**Advanced Analysis:** Through the integration of the Gemini Vertex API, the -system can analyze fertilizer bag labels more thoroughly, identifying not only +**Advanced Analysis:** Through the integration of the Gemini Vertex API, the +system can analyze fertilizer bag labels more thoroughly, identifying not only basic information but also subtle differences that may escape human inspection. ## Future Outlook + The Harvester prototype is a crucial step toward realizing a -comprehensive automated inspection system. With continuous testing and -improvements, it has the potential to transform the way fertilizer bag -inspections are conducted, bringing an advanced technological solution +comprehensive automated inspection system. With continuous testing and +improvements, it has the potential to transform the way fertilizer bag +inspections are conducted, bringing an advanced technological solution to the agricultural sector. From 2c44337a5ce326941cfbc866e667bade5944e4e5 Mon Sep 17 00:00:00 2001 From: samuel Pelletier-Evraire Date: Wed, 10 Apr 2024 12:26:31 -0400 Subject: [PATCH 12/16] issue #6: Rethink and update the overview Description --- README.md | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 848106dd..0d098d80 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,22 @@ ## Overview Description --- -The Harvester project, represents a significant -advancement in fertilizer bag inspection. The primary goal of this prototype is -to test and validate various potential solutions that could be integrated into -the final project. The AI-Lab team, utilizing unit tests, strives to determine -the best approach to address issues associated with fertilizer bag inspection. +The FertiScan project, initiated by the AI-Lab, aims to streamline the process +of capturing and organizing information on fertilizer labels. By leveraging AI +technology, the mobile application will allow users to scan fertilizer labels, +extract essential data, and automatically load this data into a database for +easy access and analysis. This project involves the AI-Lab, the CFIA, and +clients such as inspectors and teams who will benefit from the streamlined +process. FertiScan is a web application that facilitates the inspection process +wherever internet access is available. By automating fertilizer bag inspection, +the project aims to increase the efficiency and accuracy of the inspection +process. Through the integration of the Gemini Vertex API, the system can +analyze fertilizer bag labels more thoroughly, identifying not only basic +information but also subtle differences that may escape human inspection. +The Harvester prototype is a crucial step towards realizing a complete +automated inspection system. With continuous testing and improvements, it has +the potential to transform the way fertilizer bag inspections are conducted, +bringing an advanced technological solution to the agricultural sector. ## Key Features @@ -37,5 +48,5 @@ basic information but also subtle differences that may escape human inspection. The Harvester prototype is a crucial step toward realizing a comprehensive automated inspection system. With continuous testing and improvements, it has the potential to transform the way fertilizer bag -inspections are conducted, bringing an advanced technological solution -to the agricultural sector. +inspections are conducted, bringing an advanced technological +solution to the agricultural sector. From f1d8b6fe19c439de42def80aa5802b6f7dc19c96 Mon Sep 17 00:00:00 2001 From: samuel Pelletier-Evraire Date: Wed, 10 Apr 2024 14:14:50 -0400 Subject: [PATCH 13/16] issue #6: update path to \\ --- app.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/app.py b/app.py index 70049dba..cf7121e9 100644 --- a/app.py +++ b/app.py @@ -20,13 +20,13 @@ def getListImage(image_paths): with open(image_data, 'rb') as f: image = f.read() request.append(Part.from_data(data=image, mime_type="image/jpeg")) - + return request def addText(request, number, baseQuestions=None): if baseQuestions is None: request.append(create_base_request(read_csv_file("base_composition_questions.csv"))) - else: + else: request.append(create_final_request(read_csv_file("questions_spreadsheet.csv"), baseQuestions)) return request @@ -53,20 +53,20 @@ def generateRequest(directory, model:GenerativeModel, vertex:vertexai, baseQuest } ), stream=False, - ) + ) if baseQuestions is None: baseQuestions = toDict(responses.text) #else: # otherQuestion = toDict(responses, baseQuestions) - + print(responses.text) - + return baseQuestions def toDict(responses, baseQuestions=None): responseAsDict = {} - if baseQuestions is None: + if baseQuestions is None: for response in responses: texte = response indice = texte.find(":") @@ -101,10 +101,10 @@ def create_final_request(file, baseQuestions, typeOfQuestion): if "seed" in categorie and "is_seed" in baseQuestions: request_AsText = addLine(request_AsText, line) - + if "tank_mixing" in categorie and "is_tank_mixing" in baseQuestions: request_AsText = addLine(request_AsText, line) - + if "microorganism" in categorie and "contain_microorganism" in baseQuestions: request_AsText = addLine(request_AsText, line) @@ -127,10 +127,10 @@ def create_final_request(file, baseQuestions, typeOfQuestion): if "seed" in categorie & "is_seed" in baseQuestions: request_AsText = addLine(request_AsText, line) - + if "tank_mixing" in categorie & "is_tank_mixing" in baseQuestions: request_AsText = addLine(request_AsText, line) - + if "microorganism" in categorie & "contain_microorganism" in baseQuestions: request_AsText = addLine(request_AsText, line) @@ -149,7 +149,7 @@ def create_final_request(file, baseQuestions, typeOfQuestion): if "mixture_product" in categorie and "is_mixture_product" in baseQuestions: request_AsText = addLine(request_AsText, line) return request_AsText - + def addLine(requestAsText, line, typeOfQuestion): if not line.isnull().all(): @@ -163,15 +163,15 @@ def create_base_request(file): if not line.isnull().all(): specification = line['Specification'] requestAsText += str(specification) + "\n" - + line_text = str(line['Key']) + ":" + str(line['Question']) + "; \n" requestAsText += line_text return requestAsText - - - + + + model = GenerativeModel("gemini-1.0-pro-vision-001") projectinit=vertexai.init(project="test-application-2-416219", location="northamerica-northeast1") #Original question @@ -181,6 +181,6 @@ def create_base_request(file): baseQuestions = generateRequest('company_image_folder\\acti_sol1', model, projectinit, None, "modified_question") baseQuestions = generateRequest('company_image_folder\\acti_sol1', model, projectinit, baseQuestions, "modified_question") -#generateRequest('Company_Image_Folder\Bio_Fleur', model, projectinit) -#generateRequest('Company_Image_Folder\Bio_Fleur', model, projectinit) -#generateRequest('Company_Image_Folder\Bio_Fleur', model, projectinit) +#generateRequest('Company_Image_Folder\\Bio_Fleur', model, projectinit) +#generateRequest('Company_Image_Folder\\Bio_Fleur', model, projectinit) +#generateRequest('Company_Image_Folder\\Bio_Fleur', model, projectinit) From 121f2ffc3d3c24b3d6d85f04af8a3b280e49bdbc Mon Sep 17 00:00:00 2001 From: samuel Pelletier-Evraire Date: Wed, 10 Apr 2024 14:30:34 -0400 Subject: [PATCH 14/16] Issue #6: adding main documentation hyperlink --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 0d098d80..2fc85aa8 100644 --- a/README.md +++ b/README.md @@ -50,3 +50,7 @@ comprehensive automated inspection system. With continuous testing and improvements, it has the potential to transform the way fertilizer bag inspections are conducted, bringing an advanced technological solution to the agricultural sector. + +## Main documentation + +You can find more information on the official site of Google gemini vertex ai : From 1064b9c73e07f5bbd5bf016874000339245b2342 Mon Sep 17 00:00:00 2001 From: samuel Pelletier-Evraire Date: Wed, 10 Apr 2024 14:32:26 -0400 Subject: [PATCH 15/16] Issue #6: Modifying main documentation to References --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2fc85aa8..277592fa 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,6 @@ improvements, it has the potential to transform the way fertilizer bag inspections are conducted, bringing an advanced technological solution to the agricultural sector. -## Main documentation +## References You can find more information on the official site of Google gemini vertex ai : From aabfc13bc1a8b89a893bcbb0c3b7619cfaa74718 Mon Sep 17 00:00:00 2001 From: samuel Pelletier-Evraire Date: Wed, 10 Apr 2024 14:42:19 -0400 Subject: [PATCH 16/16] issue #6: Test workflow --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 277592fa..5c6c55a1 100644 --- a/README.md +++ b/README.md @@ -53,4 +53,4 @@ solution to the agricultural sector. ## References -You can find more information on the official site of Google gemini vertex ai : +You can find more information on the official site of Google gemini vertex ai: