Spaces:
Sleeping
Sleeping
Set default token
Browse files
app.py
CHANGED
@@ -19,13 +19,13 @@ OUT_DIR = "out/"
|
|
19 |
|
20 |
|
21 |
def gr_generate_map(
|
22 |
-
token: str,
|
23 |
side_len: str,
|
24 |
show_mask: bool,
|
25 |
show_hospitals: bool = True,
|
26 |
show_police: bool = True,
|
27 |
region: str = "None",
|
28 |
):
|
|
|
29 |
side_len = float(side_len)
|
30 |
|
31 |
scattermaps = []
|
@@ -168,9 +168,6 @@ with gr.Blocks() as demo:
|
|
168 |
gr.Markdown("""# Serpentinite Sampling Grid Generator""")
|
169 |
|
170 |
with gr.Tab("Sampling"):
|
171 |
-
grid_token = gr.Textbox(
|
172 |
-
value="", label="Mapbox Token (visit https://account.mapbox.com/)"
|
173 |
-
)
|
174 |
grid_side_len = gr.Textbox(value="100", label="Sampling Gap (m)")
|
175 |
|
176 |
grid_show_mask = gr.Checkbox(False, label="Show Mask")
|
@@ -200,14 +197,13 @@ with gr.Blocks() as demo:
|
|
200 |
|
201 |
grid_button.click(
|
202 |
gr_generate_map,
|
203 |
-
inputs=[
|
204 |
outputs=[grid_map, grid_shapefile, grid_point_info, grid_point_table],
|
205 |
)
|
206 |
|
207 |
grid_region.change(
|
208 |
gr_generate_map,
|
209 |
inputs=[
|
210 |
-
grid_token,
|
211 |
grid_side_len,
|
212 |
grid_show_mask,
|
213 |
grid_show_hosp,
|
|
|
19 |
|
20 |
|
21 |
def gr_generate_map(
|
|
|
22 |
side_len: str,
|
23 |
show_mask: bool,
|
24 |
show_hospitals: bool = True,
|
25 |
show_police: bool = True,
|
26 |
region: str = "None",
|
27 |
):
|
28 |
+
token = "pk.eyJ1IjoiZGlsaXRoIiwiYSI6ImNsaTZ3b3I4MjF6MmczZG80cXBmeTgyaGsifQ.JmrU3qbp2jlK_9Yl2il8pw"
|
29 |
side_len = float(side_len)
|
30 |
|
31 |
scattermaps = []
|
|
|
168 |
gr.Markdown("""# Serpentinite Sampling Grid Generator""")
|
169 |
|
170 |
with gr.Tab("Sampling"):
|
|
|
|
|
|
|
171 |
grid_side_len = gr.Textbox(value="100", label="Sampling Gap (m)")
|
172 |
|
173 |
grid_show_mask = gr.Checkbox(False, label="Show Mask")
|
|
|
197 |
|
198 |
grid_button.click(
|
199 |
gr_generate_map,
|
200 |
+
inputs=[grid_side_len, grid_show_mask],
|
201 |
outputs=[grid_map, grid_shapefile, grid_point_info, grid_point_table],
|
202 |
)
|
203 |
|
204 |
grid_region.change(
|
205 |
gr_generate_map,
|
206 |
inputs=[
|
|
|
207 |
grid_side_len,
|
208 |
grid_show_mask,
|
209 |
grid_show_hosp,
|