Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|