Spaces:
Runtime error
Runtime error
Commit
·
440ee82
1
Parent(s):
15534c0
refactor: put css in separate file
Browse files- style.css +68 -0
- wanderlust.py +2 -62
style.css
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.jupyter-widgets.leaflet-widgets {
|
| 2 |
+
height: 100%;
|
| 3 |
+
border-radius: 20px;
|
| 4 |
+
}
|
| 5 |
+
|
| 6 |
+
.solara-autorouter-content {
|
| 7 |
+
display: flex;
|
| 8 |
+
flex-direction: column;
|
| 9 |
+
justify-content: stretch;
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
.v-toolbar__title {
|
| 13 |
+
display: flex;
|
| 14 |
+
align-items: center;
|
| 15 |
+
column-gap: 0.5rem;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
.ui-container {
|
| 19 |
+
height: 95vh;
|
| 20 |
+
justify-content: center;
|
| 21 |
+
padding: 45px 50px 75px 50px;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
.chat-interface {
|
| 25 |
+
height: 100%;
|
| 26 |
+
width: 38vw;
|
| 27 |
+
justify-content: center;
|
| 28 |
+
position: relative;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
.chat-interface:after {
|
| 32 |
+
content: "";
|
| 33 |
+
position: absolute;
|
| 34 |
+
z-index: 1;
|
| 35 |
+
top: 0;
|
| 36 |
+
left: 0;
|
| 37 |
+
pointer-events: none;
|
| 38 |
+
background-image: linear-gradient(to top, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 100%);
|
| 39 |
+
width: 100%;
|
| 40 |
+
height: 15%;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.map-container {
|
| 44 |
+
width: 50vw;
|
| 45 |
+
height: 100%;
|
| 46 |
+
justify-content: center;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
@media screen and (max-aspect-ratio: 1/1) {
|
| 50 |
+
.ui-container {
|
| 51 |
+
padding: 30px;
|
| 52 |
+
height: 100vh;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
.container-row {
|
| 56 |
+
flex-direction: column-reverse !important;
|
| 57 |
+
width: 100% !important;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
.chat-interface {
|
| 61 |
+
width: unset;
|
| 62 |
+
justify-content: flex-end;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
.map-container {
|
| 66 |
+
width: unset;
|
| 67 |
+
}
|
| 68 |
+
}
|
wanderlust.py
CHANGED
|
@@ -20,6 +20,7 @@ markers = solara.reactive([])
|
|
| 20 |
url = ipyleaflet.basemaps.OpenStreetMap.Mapnik.build_url()
|
| 21 |
openai = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
|
| 22 |
model = "gpt-4-1106-preview"
|
|
|
|
| 23 |
|
| 24 |
|
| 25 |
# Declare tools for openai assistant to use
|
|
@@ -271,65 +272,4 @@ def Page():
|
|
| 271 |
with solara.Column(classes=["map-container"]):
|
| 272 |
Map()
|
| 273 |
|
| 274 |
-
solara.Style(
|
| 275 |
-
"""
|
| 276 |
-
.jupyter-widgets.leaflet-widgets{
|
| 277 |
-
height: 100%;
|
| 278 |
-
border-radius: 20px;
|
| 279 |
-
}
|
| 280 |
-
.solara-autorouter-content{
|
| 281 |
-
display: flex;
|
| 282 |
-
flex-direction: column;
|
| 283 |
-
justify-content: stretch;
|
| 284 |
-
}
|
| 285 |
-
.v-toolbar__title{
|
| 286 |
-
display: flex;
|
| 287 |
-
align-items: center;
|
| 288 |
-
column-gap: 0.5rem;
|
| 289 |
-
}
|
| 290 |
-
.ui-container{
|
| 291 |
-
height: 95vh;
|
| 292 |
-
justify-content: center;
|
| 293 |
-
padding: 45px 50px 75px 50px;
|
| 294 |
-
}
|
| 295 |
-
.chat-interface{
|
| 296 |
-
height: 100%;
|
| 297 |
-
width: 38vw;
|
| 298 |
-
justify-content: center;
|
| 299 |
-
position: relative;
|
| 300 |
-
}
|
| 301 |
-
.chat-interface:after {
|
| 302 |
-
content: "";
|
| 303 |
-
position: absolute;
|
| 304 |
-
z-index: 1;
|
| 305 |
-
top: 0;
|
| 306 |
-
left: 0;
|
| 307 |
-
pointer-events: none;
|
| 308 |
-
background-image: linear-gradient(to top, rgba(255,255,255,0), rgba(255,255,255, 1) 100%);
|
| 309 |
-
width: 100%;
|
| 310 |
-
height: 15%;
|
| 311 |
-
}
|
| 312 |
-
.map-container{
|
| 313 |
-
width: 50vw;
|
| 314 |
-
height: 100%;
|
| 315 |
-
justify-content: center;
|
| 316 |
-
}
|
| 317 |
-
@media screen and (max-aspect-ratio: 1/1) {
|
| 318 |
-
.ui-container{
|
| 319 |
-
padding: 30px;
|
| 320 |
-
height: 100vh;
|
| 321 |
-
}
|
| 322 |
-
.container-row{
|
| 323 |
-
flex-direction: column-reverse !important;
|
| 324 |
-
width: 100% !important;
|
| 325 |
-
}
|
| 326 |
-
.chat-interface{
|
| 327 |
-
width: unset;
|
| 328 |
-
justify-content: flex-end;
|
| 329 |
-
}
|
| 330 |
-
.map-container{
|
| 331 |
-
width: unset;
|
| 332 |
-
}
|
| 333 |
-
}
|
| 334 |
-
"""
|
| 335 |
-
)
|
|
|
|
| 20 |
url = ipyleaflet.basemaps.OpenStreetMap.Mapnik.build_url()
|
| 21 |
openai = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
|
| 22 |
model = "gpt-4-1106-preview"
|
| 23 |
+
app_style = open("style.css", "r").read()
|
| 24 |
|
| 25 |
|
| 26 |
# Declare tools for openai assistant to use
|
|
|
|
| 272 |
with solara.Column(classes=["map-container"]):
|
| 273 |
Map()
|
| 274 |
|
| 275 |
+
solara.Style(app_style)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|