Spaces:
Build error
Build error
| import gradio as gr | |
| from main_operations import ss_intersect | |
| #from datasets import load_dataset | |
| #ds = load_dataset('psalama/NYC_sensitive_sites', data_files=data_files) | |
| iface = gr.Interface( | |
| fn=ss_intersect, | |
| inputs=[ | |
| gr.inputs.File(label="Building Footprints GeoJSON"), | |
| gr.Radio(["Parks Properties", "Park Zones"], label="Which Sensitive Sites?", info="From NYC DPR", type="index"), | |
| 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"), #Can I make this optional? | |
| ], | |
| outputs=[ | |
| gr.outputs.Image(type="pil", label="Result Image"), | |
| gr.outputs.File(label="Building Buffers"), | |
| gr.outputs.File(label="Union of Building Buffers"), | |
| gr.outputs.Textbox(label="Building intersection descriptions"), | |
| ], | |
| examples=[ | |
| ["files/building4test.geojson", "Parks Properties", 4.3, 200], | |
| ["files/building4test.geojson", "Park Zones", 4.3, 900], | |
| ], | |
| title="Shadow Sensitive Site Proximity", | |
| description="This tool automatically checks if proposed buildings would cast a shadows on NYC's 'Sensitive Sites'. Upload a GeoJSON file of proposed building footprints to output an image of intersected sensitive sites.", | |
| ) | |
| iface.launch() |