Spaces:
Sleeping
Sleeping
Kelbec
commited on
Commit
•
59d1a4a
1
Parent(s):
5b7b42b
fix for deployment
Browse files- Dockerfile +3 -2
- pages/visualization.py +5 -5
Dockerfile
CHANGED
@@ -15,13 +15,14 @@ RUN pip install -r requirements.txt
|
|
15 |
|
16 |
RUN mkdir ./pages
|
17 |
COPY /pages ./pages
|
|
|
|
|
18 |
|
19 |
ENV PROJ_LIB='/opt/conda/share/proj'
|
20 |
|
21 |
USER root
|
22 |
RUN chown -R ${NB_UID} ${HOME}
|
23 |
USER ${NB_USER}
|
24 |
-
RUN mkdir ./public
|
25 |
EXPOSE 8765
|
26 |
|
27 |
-
CMD ["solara", "run", "./pages", "--host=0.0.0.0"]
|
|
|
15 |
|
16 |
RUN mkdir ./pages
|
17 |
COPY /pages ./pages
|
18 |
+
COPY /data ./data
|
19 |
+
COPY /assets ./assets
|
20 |
|
21 |
ENV PROJ_LIB='/opt/conda/share/proj'
|
22 |
|
23 |
USER root
|
24 |
RUN chown -R ${NB_UID} ${HOME}
|
25 |
USER ${NB_USER}
|
|
|
26 |
EXPOSE 8765
|
27 |
|
28 |
+
CMD ["solara", "run", "./pages", "--host=0.0.0.0", "--port=8765"]
|
pages/visualization.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import plotly.express as px
|
2 |
import pandas as pd
|
3 |
-
|
4 |
# import leafmap
|
5 |
import leafmap.kepler as leafmap
|
6 |
import solara
|
@@ -180,8 +180,8 @@ def PlotComponent(data):
|
|
180 |
|
181 |
@solara.component
|
182 |
def Page():
|
183 |
-
icisk_logo_path = "
|
184 |
-
geco_logo_path = "
|
185 |
|
186 |
|
187 |
open_station_1, set_open_station_1 = solara.use_state(False)
|
@@ -226,9 +226,9 @@ def Page():
|
|
226 |
|
227 |
if open_station_1:
|
228 |
MapComponent(44.428,11.9086)
|
229 |
-
PlotComponent("
|
230 |
if open_station_2:
|
231 |
MapComponent(44.433333, 11.683333)
|
232 |
-
PlotComponent("
|
233 |
|
234 |
|
|
|
1 |
import plotly.express as px
|
2 |
import pandas as pd
|
3 |
+
import os
|
4 |
# import leafmap
|
5 |
import leafmap.kepler as leafmap
|
6 |
import solara
|
|
|
180 |
|
181 |
@solara.component
|
182 |
def Page():
|
183 |
+
icisk_logo_path = os.getcwd()+"/assets/icisk_logo_full.png"
|
184 |
+
geco_logo_path = os.getcwd()+"/assets/logo-sito-800x400.png"
|
185 |
|
186 |
|
187 |
open_station_1, set_open_station_1 = solara.use_state(False)
|
|
|
226 |
|
227 |
if open_station_1:
|
228 |
MapComponent(44.428,11.9086)
|
229 |
+
PlotComponent(os.getcwd()+"/data/dati_1.csv")
|
230 |
if open_station_2:
|
231 |
MapComponent(44.433333, 11.683333)
|
232 |
+
PlotComponent(os.getcwd()+"/data/dati_2.csv")
|
233 |
|
234 |
|