Spaces:
Sleeping
Sleeping
File size: 523 Bytes
ec2c5f3 4e0c1bc ec2c5f3 4e0c1bc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
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 |