From 1714b6d1809556961b8b5096aec583eaeb04e287 Mon Sep 17 00:00:00 2001 From: Hiromu Hota Date: Fri, 2 Oct 2020 12:36:15 -0700 Subject: [PATCH] Loosen Keras' version restriction, which is now unnecessarily strict (#68) * Loosen Keras' version restriction, which is now unnecessarily strict * Correctly use the vision-based model --- CHANGELOG.md | 4 ++++ setup.py | 2 +- tests/test_basic.py | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e96cb42..83e48d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed +- [@HiromuHota][HiromuHota]: Loosen Keras' version restriction, which is now unnecessarily strict. + ([#68](https://github.com/HazyResearch/pdftotree/pull/68)) + ### Fixed - [@HiromuHota][HiromuHota]: Fix a bug that an html file is not created at a given path. ([#64](https://github.com/HazyResearch/pdftotree/pull/64)) diff --git a/setup.py b/setup.py index f6c1118..c0ea017 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ install_requires=[ "IPython", "beautifulsoup4", - "keras==2.0.8", + "keras>=2.0.8,<2.4.0", # keras>=2.4.0 requires TensorFlow 2.2 or higher "numpy", "pandas", "pdfminer.six>=20191020", diff --git a/tests/test_basic.py b/tests/test_basic.py index 877a82b..6e1d347 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -42,11 +42,11 @@ def test_ml_completion(): assert output is not None -def test_visual_completion(): - """Simply test that ML-based parse runs without errors.""" +def test_vision_completion(): + """Simply test that vision-based parse runs without errors.""" output = pdftotree.parse( "tests/input/paleo.pdf", - model_type="visual", + model_type="vision", model_path="tests/input/paleo_visual_model.h5", ) assert output is not None