mirror of
https://github.com/Xevion/runnerspace.git
synced 2025-12-08 18:08:38 -06:00
Remove runtime spacy model downloading
This commit is contained in:
14
app.py
14
app.py
@@ -27,13 +27,13 @@ def create_app():
|
|||||||
|
|
||||||
# Heroku deployment
|
# Heroku deployment
|
||||||
if app.config['ENV'] == 'production':
|
if app.config['ENV'] == 'production':
|
||||||
# Deal with spacy model downloading
|
# # Deal with spacy model downloading
|
||||||
spacy_model = 'en_core_web_sm'
|
# spacy_model = 'en_core_web_sm'
|
||||||
try:
|
# try:
|
||||||
spacy.load(spacy_model)
|
# spacy.load(spacy_model)
|
||||||
except: # If not present, we download
|
# except: # If not present, we download
|
||||||
spacy.cli.download(spacy_model)
|
# spacy.cli.download(spacy_model)
|
||||||
spacy.load(spacy_model)
|
# spacy.load(spacy_model)
|
||||||
|
|
||||||
app.config['SECRET_KEY'] = os.getenv('SECRET_KEY')
|
app.config['SECRET_KEY'] = os.getenv('SECRET_KEY')
|
||||||
app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('DATABASE_URL', '').replace('postgres://', 'postgresql://', 1)
|
app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('DATABASE_URL', '').replace('postgres://', 'postgresql://', 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user