chenguittiMaroua commited on
Commit
cdc0a21
·
verified ·
1 Parent(s): 425fbf9

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +11 -0
main.py CHANGED
@@ -35,6 +35,17 @@ logger = logging.getLogger(__name__)
35
 
36
  app = FastAPI()
37
 
 
 
 
 
 
 
 
 
 
 
 
38
  # Apply rate limiting middleware
39
  app.state.limiter = limiter
40
  app.add_middleware(SlowAPIMiddleware)
 
35
 
36
  app = FastAPI()
37
 
38
+
39
+ # Serve static files (frontend)
40
+ app.mount("/static", StaticFiles(directory="static"), name="static")
41
+
42
+
43
+ @app.get("/", response_class=HTMLResponse)
44
+ def home ():
45
+ with open("static/indexAI.html","r") as file :
46
+ return file.read()
47
+
48
+
49
  # Apply rate limiting middleware
50
  app.state.limiter = limiter
51
  app.add_middleware(SlowAPIMiddleware)