Spaces:
Build error

File size: 908 Bytes
17e9832
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import gradio as gr

# Feature 1: longitude, in a range between -100,100
input_module1= gr.Number(label='longitude')
# Feature 2: latitude, in a range between -100,100
input_module2= gr.Number(label='latitude')
# Feature 3: population, numeric value between 0, 100
input_module3= gr.Number(label='population')
# Feature 4: income level, categorical values with low, median , high
input_module4= gr.Dropdown(choices=['low', 'medium', 'high'], label='income level')

## outputs:
# price: numeric value
output_module=gr.Number(label='predicted house value')
## design a random function accepts four features and output any random value
def process_inputs(input1, input2, input3, input4):

  output = 1
  return output

demo=gr.Interface(fn= process_inputs,
             inputs=[input_module1, input_module2, input_module3, input_module4],
             outputs=output_module).launch(debug=True) 


demo.launch()