Spaces:
Running
Running
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import leafmap.foliumap as leafmap
|
3 |
+
|
4 |
+
|
5 |
+
def split(left, right):
|
6 |
+
m = leafmap.Map()
|
7 |
+
m.split_map(left_layer=left, right_layer=right)
|
8 |
+
return m.to_gradio()
|
9 |
+
|
10 |
+
|
11 |
+
left_url = 'https://opendata.digitalglobe.com/events/california-fire-2020/pre-event/2018-02-16/pine-gulch-fire20/1030010076004E00.tif'
|
12 |
+
right_url = 'https://opendata.digitalglobe.com/events/california-fire-2020/post-event/2020-08-14/pine-gulch-fire20/10300100AAC8DD00.tif'
|
13 |
+
left_input = gr.Textbox(value=left_url, label="Left Layer URL")
|
14 |
+
right_input = gr.Textbox(value=right_url, label="Right Layer URL")
|
15 |
+
|
16 |
+
demo = gr.Interface(split, [left_input, right_input], "html")
|
17 |
+
demo.launch()
|