pvanand commited on
Commit
bd97934
·
verified ·
1 Parent(s): 92ee903

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -1
main.py CHANGED
@@ -4,6 +4,7 @@ from fastapi.middleware.cors import CORSMiddleware
4
  from dotenv import load_dotenv
5
  from routers.llm_chat import router as llm_chat_router
6
  from routers.scraping_router import router as scraping_router
 
7
 
8
  app = FastAPI(
9
  title="LLM Chat API",
@@ -20,10 +21,14 @@ app.add_middleware(
20
  allow_headers=["*"], # Allows all headers
21
  )
22
 
23
- # Include the router
 
 
 
24
  app.include_router(llm_chat_router)
25
  app.include_router(scraping_router)
26
 
 
27
  if __name__ == "__main__":
28
  import uvicorn
29
  uvicorn.run(app, host="0.0.0.0", port=8000)
 
4
  from dotenv import load_dotenv
5
  from routers.llm_chat import router as llm_chat_router
6
  from routers.scraping_router import router as scraping_router
7
+ from fastapi.staticfiles import StaticFiles
8
 
9
  app = FastAPI(
10
  title="LLM Chat API",
 
21
  allow_headers=["*"], # Allows all headers
22
  )
23
 
24
+ # Add UI
25
+ app.mount("/", StaticFiles(directory="static/ui", html=True), name="index")
26
+
27
+ # Include the routers
28
  app.include_router(llm_chat_router)
29
  app.include_router(scraping_router)
30
 
31
+
32
  if __name__ == "__main__":
33
  import uvicorn
34
  uvicorn.run(app, host="0.0.0.0", port=8000)