diff --git a/optuna_dashboard/_app.py b/optuna_dashboard/_app.py
index ba5d2bd5..f1772dc9 100644
--- a/optuna_dashboard/_app.py
+++ b/optuna_dashboard/_app.py
@@ -50,82 +50,6 @@ logger = logging.getLogger(__name__)
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
STATIC_DIR = os.path.join(BASE_DIR, "public")
-INDEX_HTML = """
-
-
- Optuna Dashboard
-
-
-
-
-
-
-
-
-
- NOW LOADING
-
-
-
-
-""" # noqa:E501
# In-memory trials cache
trials_cache_lock = threading.Lock()
trials_cache: Dict[int, List[FrozenTrial]] = {}
@@ -191,8 +115,7 @@ def create_app(storage: BaseStorage) -> Bottle:
# Accept any following paths for client-side routing
@app.get("/dashboard<:re:(/.*)?>")
def dashboard() -> BottleViewReturn:
- response.content_type = "text/html"
- return INDEX_HTML
+ return static_file("index.html", BASE_DIR, mimetype="text/html")
@app.get("/api/studies")
@json_api_view
@@ -324,6 +247,10 @@ def create_app(storage: BaseStorage) -> Bottle:
response.status = 204 # No content
return {}
+ @app.get("/favicon.ico")
+ def favicon() -> BottleViewReturn:
+ return static_file("favicon.ico", BASE_DIR)
+
@app.get("/static/")
def send_static(filename: str) -> BottleViewReturn:
return static_file(filename, root=STATIC_DIR)
diff --git a/optuna_dashboard/favicon.ico b/optuna_dashboard/favicon.ico
new file mode 100644
index 00000000..3b07f073
Binary files /dev/null and b/optuna_dashboard/favicon.ico differ
diff --git a/optuna_dashboard/index.html b/optuna_dashboard/index.html
new file mode 100644
index 00000000..ec437f11
--- /dev/null
+++ b/optuna_dashboard/index.html
@@ -0,0 +1,75 @@
+
+
+
+ Optuna Dashboard
+
+
+
+
+
+
+
+
+
+ NOW LOADING
+
+
+
+
\ No newline at end of file