ehsanulhaque92/multimodal-prescriptive-pdm
0
1import os2import logging3from flask import Flask4from data_ingestion.ingest_text import run_ingestion_if_needed5 6# Setup logging7logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')8 9# Run data ingestion on startup if the DB doesn't exist.10# This is crucial for cloud deployment.11run_ingestion_if_needed()12 13# Initialize the Flask app14app = Flask(__name__)15 16logging.info("Flask app initialized. Models will be loaded on first use.")17 18# Import the routes after the app is created to avoid circular imports19from app import routes