Initial commit: MLflow dashboard project
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
27
main.py
Normal file
27
main.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from fastapi import FastAPI
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
from fastapi.responses import FileResponse
|
||||
from routers import experiments, runs, serve, train
|
||||
|
||||
app = FastAPI(
|
||||
title="MLflow Dashboard API",
|
||||
description="MLflow Experiment/Run 조회 및 Train/Serve 관리",
|
||||
version="0.1.0",
|
||||
)
|
||||
|
||||
app.include_router(experiments.router, prefix="/api", tags=["Experiments"])
|
||||
app.include_router(runs.router, prefix="/api", tags=["Runs"])
|
||||
app.include_router(serve.router, prefix="/api", tags=["Serve"])
|
||||
app.include_router(train.router, prefix="/api", tags=["Train"])
|
||||
|
||||
app.mount("/static", StaticFiles(directory="static"), name="static")
|
||||
|
||||
|
||||
@app.get("/")
|
||||
def index():
|
||||
return FileResponse("static/index.html")
|
||||
|
||||
|
||||
@app.get("/health")
|
||||
def health():
|
||||
return {"status": "ok"}
|
||||
Reference in New Issue
Block a user