Replacing the placeholder worker with a real one

This commit is contained in:
2020-04-16 14:24:17 +02:00
parent 50a4c09c3c
commit ca0c55f052
9 changed files with 181 additions and 4 deletions

14
worker/prefetch_models.py Normal file
View File

@@ -0,0 +1,14 @@
'''
Pre-fetches the required model from github.
'''
import os
from spleeter.model.provider import get_default_model_provider
PREFETCH_MODELS = ['2stems']
for model_name in PREFETCH_MODELS:
get_default_model_provider().download(
model_name,
os.path.join(os.getenv('MODEL_PATH'), model_name))