Spaces:
Runtime error
Runtime error
File size: 1,031 Bytes
6bd4abf 4edbe8b 621197c 4edbe8b 621197c 4edbe8b 8a21b24 0fbe956 4edbe8b 0fbe956 4edbe8b 8a21b24 4edbe8b 57af65a 4edbe8b 0fbe956 6bd4abf 57af65a 4edbe8b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import gradio as gr
def process_input(address, selected_option, additional_input):
if selected_option in ["Off-Street Parking Facility", "Residential"]:
output_text = f"You entered the address: {address}. Selected option: {selected_option}. Number of Units/Spaces: {additional_input}."
else:
output_text = f"You entered the address: {address}. Selected option: {selected_option}. Area (in 1000 GSF): {additional_input}."
return output_text
iface = gr.Interface(
fn=process_input,
inputs=[
gr.inputs.Textbox(label="Enter your address"),
gr.inputs.Radio(["Residential", "Office", "Regional Retail", "Local Retail", "Sit Down/High Turnover Restaurant", "Fast Food/without Drive Through",
"Community Facility", "Off-Street Parking Facility"], label="Select an option"),
gr.inputs.Number(label="Number of Units/Spaces or Area (in 1000 GSF)", default=1) # Default value is 1
],
outputs=gr.outputs.Textbox(label="Output"),
)
iface.launch()
|