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://github.com/opengeos/data/releases/download/raster/Libya-2023-07-01.tif"
)
right_url = (
"https://github.com/opengeos/data/releases/download/raster/Libya-2023-09-13.tif"
)
left_input = gr.Textbox(value=left_url, label="Left Layer URL")
right_input = gr.Textbox(value=right_url, label="Right Layer URL")
demo = gr.Interface(split, [left_input, right_input], "html")
# demo.launch()