Spaces:
Runtime error
Runtime error
Update app.py
#1
by
sriyachalla - opened
app.py
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
def process_input(address, selected_option, additional_input):
|
|
|
|
|
|
|
| 4 |
if selected_option in ["Off-Street Parking Facility", "Residential"]:
|
| 5 |
-
output_text = f"You entered the address
|
| 6 |
else:
|
| 7 |
-
output_text = f"You entered the address
|
| 8 |
return output_text
|
| 9 |
|
| 10 |
iface = gr.Interface(
|
|
@@ -19,3 +21,4 @@ iface = gr.Interface(
|
|
| 19 |
)
|
| 20 |
|
| 21 |
iface.launch()
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
def process_input(address, selected_option, additional_input):
|
| 4 |
+
transport_analysis_needed = selected_option in ["Residential", "Office", "Community Facility"]
|
| 5 |
+
|
| 6 |
if selected_option in ["Off-Street Parking Facility", "Residential"]:
|
| 7 |
+
output_text = f"You entered the address:\n{address}\n\nSelected option:\n{selected_option}\n\nNumber of Units/Spaces:\n{additional_input}\n\nTransport Analysis Needed:\n{transport_analysis_needed}"
|
| 8 |
else:
|
| 9 |
+
output_text = f"You entered the address:\n{address}\n\nSelected option:\n{selected_option}\n\nArea (in 1000 GSF):\n{additional_input}\n\nTransport Analysis Needed:\n{transport_analysis_needed}"
|
| 10 |
return output_text
|
| 11 |
|
| 12 |
iface = gr.Interface(
|
|
|
|
| 21 |
)
|
| 22 |
|
| 23 |
iface.launch()
|
| 24 |
+
|