diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 5be5c45..4045163 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -44,7 +44,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.x' + python-version: '3.8' - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/app/app.py b/app/app.py index 1bf4ae2..c7b7b5c 100644 --- a/app/app.py +++ b/app/app.py @@ -68,7 +68,7 @@ def create_app(char_limit=-1, req_limit=-1, batch_limit=-1, ga_id=None, debug=Fa @app.route("/") def index(): - return render_template(resource_filename('app', 'templates/index.html'), gaId=ga_id, frontendTimeout=frontend_timeout) + return render_template('index.html', gaId=ga_id, frontendTimeout=frontend_timeout) @app.route("/languages") def langs(): diff --git a/app/init.py b/app/init.py index 91e36b9..c540c1c 100644 --- a/app/init.py +++ b/app/init.py @@ -7,7 +7,7 @@ def boot(): check_and_install_models() def check_and_install_models(force=False): - if len(package.get_installed_packages()) == 0 or force: + if len(package.get_installed_packages()) < 2 or force: # Update package definitions from remote print("Updating language models") package.update_package_index() diff --git a/requirements.txt b/requirements.txt index 8cc97da..a82a96c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -argostranslate==1.1.0 +argostranslate==1.1.2 Flask==1.1.2 flask-swagger==0.2.14 flask-swagger-ui==3.36.0