MohammedJafar-2001 commited on
Commit
f10a1ca
·
verified ·
1 Parent(s): ec20f8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +32 -32
app.py CHANGED
@@ -1,33 +1,33 @@
1
- import pandas as pd,numpy as np
2
- import pickle
3
- import streamlit as st
4
-
5
- st.title("User Behavior Using Mobile Prediction")
6
-
7
- Device Model = st.text_input("Enter Device_Model_type")
8
- App Usage Time (min/day)= st.number_input("Enter house size")
9
- location = st.text_input("Enter the location")
10
- city = st.text_input("Enter the city")
11
- numBathrooms = st.number_input("Enter the number of bathrooms")
12
- SecurityDeposit = st.number_input("Enter the deposit amount")
13
- Status = st.text_input("Enter the status of house")
14
-
15
- model_2 = pickle.load(open(r"C:\Users\nadip\Music\MACHINE LEARNING\ML Project\rfr.pkl","rb")) #pickle file path
16
-
17
- if st.button("Submit"):
18
- result = model_2.predict([[house_type,house_size,location,city,numBathrooms,SecurityDeposit,Status]])
19
- st.write(f"The predicted price of the rental house is {result}")
20
-
21
-
22
- # age = st.number_input("Enter age",min_value=0,max_value=1000,step=1,format="%d" )
23
- # gender = st.radio("Enter gender",['Male','Female'])
24
- # chestpain = st.selectbox("chestpain",['non-anginal_pain', 'typical_angina', 'atypical_angina','asymptomatic'])
25
- # restingBP = st.number_input("Enter BP",min_value=0,max_value=1000,step=1,format="%d")
26
- # serum_cholesterol = st.number_input("Enter serum_cholesterol",min_value=0,max_value=10000,step=1,format="%d")
27
- # fasting_blood_sugar = st.radio("Enter fasting_blood_sugar",['yes','no'])
28
- # restingrelectro= st.selectbox("Enter resting_electro",['ST-T_wave_abnormality', 'normal', 'left_ventricular_hypertrophy'])
29
- # maxheartrate = st.number_input("Enter max_heart_rate",min_value=0,max_value=1000,step=1,format="%d")
30
- # exerciseangia = st.radio("Enter exercise_angia",['yes','no'])
31
- # oldpeak= st.number_input("Enter oldpeak")
32
- # slope = st.selectbox("Enter slope",['downsloping', 'upsloping', 'flat'])
33
  # noofmajorvessels = st.selectbox("enter number of major vessels",['Three', 'One', 'Zero', 'Two'])
 
1
+ import pandas as pd,numpy as np
2
+ import pickle
3
+ import streamlit as st
4
+
5
+ st.title("User Behavior Using Mobile Prediction")
6
+
7
+ Device_Model = st.text_input("Enter Device_Model_type")
8
+ App_Usage_Time (min/day)= st.number_input("Enter house size")
9
+ location = st.text_input("Enter the location")
10
+ city = st.text_input("Enter the city")
11
+ numBathrooms = st.number_input("Enter the number of bathrooms")
12
+ SecurityDeposit = st.number_input("Enter the deposit amount")
13
+ Status = st.text_input("Enter the status of house")
14
+
15
+ # model_2 = pickle.load(open(r"Mobile_data_user_behavior/rfc.pkl","rb")) #pickle file path
16
+
17
+ # if st.button("Submit"):
18
+ # result = model_2.predict([[house_type,house_size,location,city,numBathrooms,SecurityDeposit,Status]])
19
+ # st.write(f"The predicted price of the rental house is {result}")
20
+
21
+
22
+ # age = st.number_input("Enter age",min_value=0,max_value=1000,step=1,format="%d" )
23
+ # gender = st.radio("Enter gender",['Male','Female'])
24
+ # chestpain = st.selectbox("chestpain",['non-anginal_pain', 'typical_angina', 'atypical_angina','asymptomatic'])
25
+ # restingBP = st.number_input("Enter BP",min_value=0,max_value=1000,step=1,format="%d")
26
+ # serum_cholesterol = st.number_input("Enter serum_cholesterol",min_value=0,max_value=10000,step=1,format="%d")
27
+ # fasting_blood_sugar = st.radio("Enter fasting_blood_sugar",['yes','no'])
28
+ # restingrelectro= st.selectbox("Enter resting_electro",['ST-T_wave_abnormality', 'normal', 'left_ventricular_hypertrophy'])
29
+ # maxheartrate = st.number_input("Enter max_heart_rate",min_value=0,max_value=1000,step=1,format="%d")
30
+ # exerciseangia = st.radio("Enter exercise_angia",['yes','no'])
31
+ # oldpeak= st.number_input("Enter oldpeak")
32
+ # slope = st.selectbox("Enter slope",['downsloping', 'upsloping', 'flat'])
33
  # noofmajorvessels = st.selectbox("enter number of major vessels",['Three', 'One', 'Zero', 'Two'])