ocrsensitive / app /__init__.py
mashaelalbu's picture
Update app/__init__.py
4e0c1bc verified
raw
history blame contribute delete
523 Bytes
from flask import Flask
import os
def create_app():
app = Flask(__name__)
app.config.from_object('app.config.Config')
os.makedirs(app.config['UPLOAD_FOLDER'], exist_ok=True)
# تسجيل البلوبرينت
from app.routes import main
app.register_blueprint(main)
# تهيئة محلل الحساسيات عند إنشاء التطبيق
with app.app_context():
from app.routes import init_allergy_analyzer
init_allergy_analyzer(app)
return app