moazx commited on
Commit
ddf4fef
·
1 Parent(s): 2a8faae

add main.py and vercel.json

Browse files
Files changed (3) hide show
  1. api/app.py +1 -1
  2. main.py +6 -0
  3. vercel.json +7 -0
api/app.py CHANGED
@@ -34,7 +34,7 @@ async def lifespan(app: FastAPI):
34
 
35
  # Start background initialization of heavy components
36
  try:
37
- from background_init import start_background_initialization
38
  logger.info("🚀 Starting background initialization of components...")
39
  start_background_initialization()
40
  logger.info("API started successfully (components loading in background)")
 
34
 
35
  # Start background initialization of heavy components
36
  try:
37
+ from core.background_init import start_background_initialization
38
  logger.info("🚀 Starting background initialization of components...")
39
  start_background_initialization()
40
  logger.info("API started successfully (components loading in background)")
main.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ """
2
+ FastAPI entrypoint for Vercel deployment
3
+ """
4
+ from api.app import app
5
+
6
+ # Vercel will automatically detect this file and serve the FastAPI app
vercel.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "functions": {
3
+ "main.py": {
4
+ "runtime": "python3.11"
5
+ }
6
+ }
7
+ }