diff --git a/app/contributions/spacy_nlp_pipeline_models/forms.py b/app/contributions/spacy_nlp_pipeline_models/forms.py index dc3ca781..d05e5681 100644 --- a/app/contributions/spacy_nlp_pipeline_models/forms.py +++ b/app/contributions/spacy_nlp_pipeline_models/forms.py @@ -16,8 +16,8 @@ class CreateSpaCyNLPPipelineModelForm(ContributionBaseForm): ) def validate_spacy_model_file(self, field): - if not field.data.filename.lower().endswith('.tar.gz'): - raise ValidationError('.tar.gz files only!') + if not field.data.filename.lower().endswith(('.tar.gz', ('.whl'))): + raise ValidationError('.tar.gz or .whl files only!') def __init__(self, *args, **kwargs): if 'prefix' not in kwargs: diff --git a/app/templates/contributions/spacy_nlp_pipeline_models/create.html.j2 b/app/templates/contributions/spacy_nlp_pipeline_models/create.html.j2 index 091c61ad..b19241c6 100644 --- a/app/templates/contributions/spacy_nlp_pipeline_models/create.html.j2 +++ b/app/templates/contributions/spacy_nlp_pipeline_models/create.html.j2 @@ -42,7 +42,7 @@ {{ form.hidden_tag() }}