diff --git a/wanderlust.py b/wanderlust.py index 5d27f5f..695bfeb 100644 --- a/wanderlust.py +++ b/wanderlust.py @@ -1,5 +1,6 @@ import json import os +from pathlib import Path import ipyleaflet from openai import OpenAI, NotFoundError @@ -9,6 +10,8 @@ import solara +HERE = Path(__file__) + center_default = (0, 0) zoom_default = 2 @@ -20,7 +23,7 @@ url = ipyleaflet.basemaps.OpenStreetMap.Mapnik.build_url() openai = OpenAI(api_key=os.getenv("OPENAI_API_KEY")) model = "gpt-4-1106-preview" -app_style = open("style.css", "r").read() +app_style = (HERE / "style.css").read_text() # Declare tools for openai assistant to use