Spaces:
Runtime error
Runtime error
Commit ·
191e833
1
Parent(s): d9c4778
fix: app.py
Browse files2 unmodified lines345678910111213186 unmodified lines2002012022032042052062072082092102 unmodified linesfrom typing import List, Dict, Optionalimport asynciofrom main import WebScrapingOrchestratorapp = FastAPI(title="Advanced Web Scraper for LLM",description="Scrape, analyze, and store web content optimized for LLM consumption",version="1.0.0")# Global orchestrator instance186 unmodified lineselse:return "advanced"@app.on_event("shutdown")async def shutdown_event():"""Clean up on shutdown"""orchestrator.close_connections()# Run the APIif __name__ == "__main__":import uvicorn2 unmodified lines345678910111213141516171819202122186 unmodified lines2092102112122132142 unmodified linesfrom typing import List, Dict, Optionalimport asynciofrom main import WebScrapingOrchestratorfrom contextlib import asynccontextmanager@asynccontextmanagerasync def lifespan(app: FastAPI):# Startup code (if any) goes hereyield# Shutdown code goes hereawait orchestrator.close_connections()app = FastAPI(title="Advanced Web Scraper for LLM",description="Scrape, analyze, and store web content optimized for LLM consumption",version="1.0.0",lifespan = lifespan,)# Global orchestrator instance186 unmodified lineselse:return "advanced"# Run the APIif __name__ == "__main__":import uvicorn
app.py+10-6