|
|
|
|
|
|
|
|
|
|
|
|
|
|
import gradio as gr |
|
|
|
|
|
home_input = gr.inputs.Number(label="Number of homes in the city") |
|
|
people_input = gr.inputs.Number(label="Average number of person by home") |
|
|
bus_input = gr.inputs.Number(label="Number of bus in the city") |
|
|
distance_input = gr.inputs.Number(label="Average distance by bus") |
|
|
|
|
|
|
|
|
def my_app(home, people, bus, distance): |
|
|
return [home * 390, people * home * 131, bus * 36 * distance * 104] |
|
|
|
|
|
|
|
|
gr.Interface(fn=my_app, inputs=[ |
|
|
home_input, people_input, bus_input, distance_input], outputs="text").launch() |
|
|
|