princeml commited on
Commit
b5fd6f7
1 Parent(s): 0178909

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +43 -6
app.py CHANGED
@@ -11,11 +11,48 @@ st.subheader("Subheader")
11
 
12
  st.text("Welcome to my first eer streamlit app")
13
 
14
- st.markdown("""
15
 
16
- ## h2 tag
17
- ### h3 tag
18
- :moon: <br>
19
- :sunglasses:
20
 
21
- """, True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  st.text("Welcome to my first eer streamlit app")
13
 
 
14
 
 
 
 
 
15
 
16
+
17
+ def main():
18
+ CRIM = st.number_input("CRIM")
19
+
20
+ ZN = st.number_input("proportion of residential land zoned")
21
+
22
+ INDUS = st.number_input("proportion of non-retail business acres per town")
23
+
24
+ CHAS = st.number_input(
25
+ "Charles River dummy variable (= 1 if tract bounds river; 0 otherwise)")
26
+
27
+ NOX = st.number_input("nitric oxides concentration")
28
+
29
+ RM = st.number_input("average number of rooms per dwelling")
30
+
31
+ AGE = st.number_input(
32
+ "proportion of owner-occupied units built prior to 1940")
33
+
34
+ DIS = st.number_input(
35
+ "weighted distances to five Boston employment centers")
36
+
37
+ RAD = st.number_input("index of accessibility to radial highways")
38
+
39
+ TAX = st.number_input("full-value property-tax rate per $10,000")
40
+
41
+ PTRATIO = st.number_input("pupil-teacher ratio by town")
42
+
43
+ B = st.number_input("B")
44
+
45
+ LSTAT = st.number_input("LSTAT")
46
+
47
+ names = [CRIM, ZN, INDUS, CHAS, NOX, RM, AGE, DIS, RAD, TAX, PTRATIO, B, LSTAT]
48
+
49
+ if st.button("prediction"):
50
+
51
+ result = [names]
52
+ ans = predict(result)
53
+ st.success(f"your home price could be {result}")
54
+ print(result)
55
+
56
+
57
+ if __name__ == "__main__":
58
+ main()