geospatial / app.py
giswqs's picture
Update app.py
da17d62
import gradio as gr
import leafmap.foliumap as leafmap
def split(left, right):
m = leafmap.Map()
m.split_map(left_layer=left, right_layer=right)
return m.to_gradio()
left_url = 'https://opendata.digitalglobe.com/events/california-fire-2020/pre-event/2018-02-16/pine-gulch-fire20/1030010076004E00.tif'
right_url = 'https://opendata.digitalglobe.com/events/california-fire-2020/post-event/2020-08-14/pine-gulch-fire20/10300100AAC8DD00.tif'
left_input = gr.Textbox(value=left_url, label="Left Layer URL")
right_input = gr.Textbox(value=right_url, label="Right Layer URL")
title = 'Gradio for Geospatial Applications'
description = 'Visualizing geospatial datasets with Gradio and leafmap'
demo = gr.Interface(split, [left_input, right_input], "html", title=title, description=description)
demo.launch()