Skip to content

Commit

Permalink
add html pages to package data
Browse files Browse the repository at this point in the history
  • Loading branch information
jstzwj committed Sep 6, 2024
1 parent e9777fa commit d1cdc94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion olah/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@ async def lifespan(app: FastAPI):
# ======================
# Application
# ======================
code_file_path = os.path.abspath(__file__)
app = FastAPI(lifespan=lifespan, debug=False)
templates = Jinja2Templates(directory="static")
templates = Jinja2Templates(directory=os.path.join(os.path.dirname(code_file_path), "..", "static"))


class AppSettings(BaseSettings):
# The address of the model controller.
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@ olah-cli = "olah.server:cli"
[tool.setuptools.packages.find]
exclude = ["assets*", "benchmark*", "docs", "dist*", "playground*", "scripts*", "tests*"]

[tool.setuptools.package-data]
static = ["*.html"]

[tool.wheel]
exclude = ["assets*", "benchmark*", "docs", "dist*", "playground*", "scripts*", "tests*"]

0 comments on commit d1cdc94

Please sign in to comment.