|
import gradio as gr |
|
import geopandas as gpd |
|
from shapely.geometry import shape |
|
|
|
def predict(geojson1, geojson2, value): |
|
|
|
gdf1 = gpd.read_file(geojson1.name) |
|
gdf2 = gpd.read_file(geojson2.name) |
|
|
|
|
|
|
|
|
|
|
|
return output_image |
|
|
|
iface = gr.Interface( |
|
fn=predict, |
|
inputs=[ |
|
gr.inputs.File(label="GeoJSON Input 1"), |
|
gr.inputs.File(label="GeoJSON Input 2"), |
|
gr.inputs.Slider(minimum=0.0, maximum=10.0, default=4.3, label="Building Height Multiplier"), |
|
gr.inputs.Number(default=200, label="Default Building Height"), |
|
], |
|
outputs=gr.outputs.Image(type="pil"), |
|
title="Shadow Proximity", |
|
description="Upload proposed building footprints in a GeoJSON file and select a numeric value to get the building proximity prediction.", |
|
) |
|
|
|
iface.launch() |