map-tiles / app.py
Omnibus's picture
Update app.py
81569db verified
raw
history blame
597 Bytes
import os
import gradio as gr
def get_map(inp):
if inp == os.environ.get("PASS"):
print("downloading")
os.system("wget https://download.geofabrik.de/north-america/canada/quebec-latest.osm.pbf")
#os.system("wget https://download.geofabrik.de/north-america-latest.osm.pbf")
print("done")
out = os.path.abspath("quebec-latest.osm.pbf")
print (out)
return gr.update()
with gr.Blocks() as app:
with gr.Row():
inp_pass=gr.Textbox()
btn=gr.Button()
fs = gr.FileExplorer()
btn.click(get_map,inp_pass,fs)
app.launch()