Spaces:
Sleeping
Sleeping
all changes done
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ st.set_page_config(layout="wide")
|
|
13 |
|
14 |
|
15 |
# Logo
|
16 |
-
cols = st.columns([1,
|
17 |
with cols[0]:
|
18 |
st.image("Final_IITGN-Logo-symmetric-Color.png")
|
19 |
with cols[-1]:
|
@@ -24,7 +24,7 @@ with cols[-1]:
|
|
24 |
with cols[1]:
|
25 |
st.markdown(
|
26 |
f"""
|
27 |
-
<h1 style="text-align: center;">
|
28 |
""",
|
29 |
unsafe_allow_html=True,
|
30 |
)
|
@@ -120,7 +120,7 @@ if file_url:
|
|
120 |
# unsafe_allow_html=True)
|
121 |
centroid_lon = stats_df["Centroid"].item().xy[0][0]
|
122 |
centroid_lat = stats_df["Centroid"].item().xy[1][0]
|
123 |
-
centroid_url = f"
|
124 |
st.markdown(
|
125 |
f"""
|
126 |
<div style="display: flex; justify-content: center;">
|
@@ -132,7 +132,7 @@ if file_url:
|
|
132 |
<td>Centroid</td>
|
133 |
<td>
|
134 |
({centroid_lon:.5f}, {centroid_lat:.5f})
|
135 |
-
<a href="
|
136 |
<button>View on Google Maps</button>
|
137 |
</a>
|
138 |
</td>
|
@@ -159,3 +159,14 @@ if file_url:
|
|
159 |
|
160 |
else:
|
161 |
st.warning("Please provide a KML or GeoJSON URL as a query parameter, e.g., `?file_url=<your_file_url>`")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
|
15 |
# Logo
|
16 |
+
cols = st.columns([1, 11, 1])
|
17 |
with cols[0]:
|
18 |
st.image("Final_IITGN-Logo-symmetric-Color.png")
|
19 |
with cols[-1]:
|
|
|
24 |
with cols[1]:
|
25 |
st.markdown(
|
26 |
f"""
|
27 |
+
<h1 style="text-align: center;">KML Viewer</h1>
|
28 |
""",
|
29 |
unsafe_allow_html=True,
|
30 |
)
|
|
|
120 |
# unsafe_allow_html=True)
|
121 |
centroid_lon = stats_df["Centroid"].item().xy[0][0]
|
122 |
centroid_lat = stats_df["Centroid"].item().xy[1][0]
|
123 |
+
centroid_url = f"http://maps.google.com/maps?q={centroid_lat},{centroid_lon}&layer=satellite"
|
124 |
st.markdown(
|
125 |
f"""
|
126 |
<div style="display: flex; justify-content: center;">
|
|
|
132 |
<td>Centroid</td>
|
133 |
<td>
|
134 |
({centroid_lon:.5f}, {centroid_lat:.5f})
|
135 |
+
<a href="{centroid_url}" target="_blank">
|
136 |
<button>View on Google Maps</button>
|
137 |
</a>
|
138 |
</td>
|
|
|
159 |
|
160 |
else:
|
161 |
st.warning("Please provide a KML or GeoJSON URL as a query parameter, e.g., `?file_url=<your_file_url>`")
|
162 |
+
|
163 |
+
# Add HTML button to open in Google Earth
|
164 |
+
st.markdown(
|
165 |
+
f"""
|
166 |
+
<div style="display: flex; justify-content: center;">
|
167 |
+
<a href="https://huggingface.co/spaces/SustainabilityLabIITGN/NDVI_PERG" target="_blank">
|
168 |
+
<button>Click for NDVI Timeseries</button>
|
169 |
+
</a>
|
170 |
+
""",
|
171 |
+
unsafe_allow_html=True,
|
172 |
+
)
|