Spaces:
Running
Running
Ali Hashhash
feat: implement asynchronous YouTube note generation pipeline and API endpoints
f89dbd6 | from contextlib import asynccontextmanager | |
| from fastapi import FastAPI | |
| async def lifespan(app: FastAPI): | |
| # الجزء ده بيتنفذ أول ما السيرفر يفتح | |
| print("🚀 AIdea API starting up...") | |
| yield | |
| # الجزء ده بيتنفذ لما السيرفر يقفل | |
| print("🛑 AIdea API shutting down...") | |
| # تعريف الـ app مع إضافة الـ lifespan | |
| app = FastAPI(lifespan=lifespan) | |
| # ... باقي الـ Routes بتاعتك (auth, notes, etc.) تفضل زي ما هي |