File size: 597 Bytes
e2d012c 891435c 7d6df95 ceb14ca c717e72 915a918 778cd43 81569db c717e72 6220896 891435c 7d6df95 891435c 6220896 891435c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
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() |