ritvik360 commited on
Commit
85fc0ff
·
verified ·
1 Parent(s): dca1644

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. server/app.py +6 -1
server/app.py CHANGED
@@ -34,7 +34,12 @@ app = create_fastapi_app(
34
  @app.on_event("startup")
35
  async def startup_event():
36
  from db.seed import seed_database
37
- seed_database() # This creates the 'ecommerce.db' file inside the container
 
 
 
 
 
38
 
39
  def main():
40
  import uvicorn
 
34
  @app.on_event("startup")
35
  async def startup_event():
36
  from db.seed import seed_database
37
+
38
+ # You MUST create the connection and pass it into the function
39
+ conn = sqlite3.connect('ecommerce.db')
40
+ seed_database(conn)
41
+ conn.commit()
42
+ conn.close()
43
 
44
  def main():
45
  import uvicorn