diff --git a/requirements.txt b/requirements.txt index 3a8fb3d..9033972 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -git+https://github.com/huridocs/pdf-document-layout-analysis@67365bb133dab5826a3863d2e2cc551a21b89e81 +git+https://github.com/huridocs/pdf-document-layout-analysis@a834f712edf0fc0a4660de0270f3efbb08e0031c git+https://github.com/huridocs/queue-processor@1875372bf9f6dcd1995a32c4e50ff92aa45f9ea8 slugify==0.0.1 python-Levenshtein==0.25.1 @@ -20,6 +20,6 @@ rapidfuzz==3.8.1 sentry_sdk==1.44.0 pymongo==4.6.3 graypy==2.1.0 -setfit==1.1.0 +setfit==1.0.3 fuzzywuzzy==0.18.0 httpx==0.27.0 \ No newline at end of file diff --git a/src/extractors/pdf_to_multi_option_extractor/multi_labels_methods/tests/test_setfit_multilingual.py b/src/extractors/pdf_to_multi_option_extractor/multi_labels_methods/tests/test_setfit_multilingual.py index 07835be..554fbb4 100644 --- a/src/extractors/pdf_to_multi_option_extractor/multi_labels_methods/tests/test_setfit_multilingual.py +++ b/src/extractors/pdf_to_multi_option_extractor/multi_labels_methods/tests/test_setfit_multilingual.py @@ -63,10 +63,12 @@ def test_train_and_predict(self): self.assertEqual(3, len(predictions)) self.assertIn(Option(id="1", label="1"), predictions[0]) + self.assertNotIn(Option(id="5", label="5"), predictions[0]) + self.assertIn(Option(id="2", label="2"), predictions[1]) self.assertIn(Option(id="3", label="3"), predictions[1]) + self.assertNotIn(Option(id="4", label="4"), predictions[1]) + self.assertIn(Option(id="4", label="4"), predictions[2]) self.assertIn(Option(id="1", label="1"), predictions[2]) - self.assertNotIn(Option(id="5", label="5"), predictions[0]) - self.assertNotIn(Option(id="4", label="4"), predictions[1]) self.assertNotIn(Option(id="3", label="3"), predictions[2])