Account type: custom; language: python3.8
In a post method request, a function called separate eventually adds a folder to my file directory. After that render template is supposed to run, but it is not running. The print function below was displayed in the server log.
# separate stems
separate(filename)
print("above function is done but render template doesn't run")
return render_template("download.html")
For anyone who is curious, the separate function runs ML on a file:
def separate(filename):
from spleeter.separator import Separator
separator = Separator('spleeter:2stems')
separator.separate_to_file(os.path.join(app.root_path, app.config['UPLOAD_FOLDER'], filename), os.path.join(app.root_path, app.config['STEMS_FOLDER']))
To be clear, the render_template function works when it is directly above the separate function. Has anyone ever experienced this before? I would greatly appreciate any suggestions to move forward, thanks.