allow .whl files for spacy nlp pipeline contributions

This commit is contained in:
Patrick Jentsch
2024-02-14 14:24:21 +01:00
parent 05ab204e5a
commit cf8c164d60
2 changed files with 3 additions and 3 deletions

View File

@ -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: