Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,28 +7,8 @@ from streamlit_folium import folium_static
|
|
7 |
from datetime import datetime, timedelta
|
8 |
import plotly.graph_objects as go
|
9 |
import plotly.express as px
|
10 |
-
from folium.plugins import HeatMap
|
11 |
import io
|
12 |
-
import base64
|
13 |
-
from streamlit.components.v1 import html
|
14 |
-
|
15 |
-
# Add Vazirmatn font
|
16 |
-
st.markdown(
|
17 |
-
"""
|
18 |
-
<link href="https://cdn.jsdelivr.net/gh/rastikerdar/[email protected]/Vazirmatn-font-face.css" rel="stylesheet" type="text/css" />
|
19 |
-
""",
|
20 |
-
unsafe_allow_html=True
|
21 |
-
)
|
22 |
-
|
23 |
-
# Configure plotly for RTL support and Persian font
|
24 |
-
import plotly.io as pio
|
25 |
-
pio.templates["custom"] = go.layout.Template(
|
26 |
-
layout=dict(
|
27 |
-
font=dict(family="Vazirmatn"),
|
28 |
-
direction="rtl"
|
29 |
-
)
|
30 |
-
)
|
31 |
-
pio.templates.default = "custom"
|
32 |
|
33 |
# Set page config at the very beginning
|
34 |
st.set_page_config(page_title="داشبورد مدیریت مزارع نیشکر", layout="wide")
|
@@ -355,11 +335,11 @@ def main():
|
|
355 |
st.write("این نقشه سرعت و جهت باد را برای منطقه شرکت کشت و صنعت نیشکر دهخدا نمایش میدهد.")
|
356 |
|
357 |
st.components.v1.html(
|
358 |
-
get_windy_iframe(DEFAULT_LOCATION['latitude'], DEFAULT_LOCATION['longitude'])
|
359 |
-
"<style>.leaflet-control-attribution { display: none !important; }</style>",
|
360 |
height=650
|
361 |
)
|
362 |
|
363 |
render_wind_info()
|
|
|
364 |
if __name__ == "__main__":
|
365 |
main()
|
|
|
7 |
from datetime import datetime, timedelta
|
8 |
import plotly.graph_objects as go
|
9 |
import plotly.express as px
|
10 |
+
from folium.plugins import HeatMap
|
11 |
import io
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
# Set page config at the very beginning
|
14 |
st.set_page_config(page_title="داشبورد مدیریت مزارع نیشکر", layout="wide")
|
|
|
335 |
st.write("این نقشه سرعت و جهت باد را برای منطقه شرکت کشت و صنعت نیشکر دهخدا نمایش میدهد.")
|
336 |
|
337 |
st.components.v1.html(
|
338 |
+
get_windy_iframe(DEFAULT_LOCATION['latitude'], DEFAULT_LOCATION['longitude']),
|
|
|
339 |
height=650
|
340 |
)
|
341 |
|
342 |
render_wind_info()
|
343 |
+
|
344 |
if __name__ == "__main__":
|
345 |
main()
|