middha commited on
Commit
8815927
Β·
verified Β·
1 Parent(s): 8adcbbe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -102,12 +102,14 @@ def generate_interview_plan(job_description: str) -> str:
102
  return "Error generating interview plan. Please try again later."
103
 
104
  # ─── Auto-initialize DB ────────────────────────────────────────────────────────
105
- @app.before_first_request
 
106
  def initialize_database():
107
  db.create_all()
108
  convert_excel_serial_dates()
109
  app.logger.info("Database initialized")
110
 
 
111
  # ─── Routes ───────────────────────────────────────────────────────────────────
112
  @app.route("/")
113
  def index():
 
102
  return "Error generating interview plan. Please try again later."
103
 
104
  # ─── Auto-initialize DB ────────────────────────────────────────────────────────
105
+
106
+ @app.before_serving
107
  def initialize_database():
108
  db.create_all()
109
  convert_excel_serial_dates()
110
  app.logger.info("Database initialized")
111
 
112
+
113
  # ─── Routes ───────────────────────────────────────────────────────────────────
114
  @app.route("/")
115
  def index():