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()