Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
model_2 = pickle.load(open(r"C:\Users\Dell\Downloads\rfc.pkl","rb")) #pickle file path
|
| 7 |
+
|
| 8 |
+
if st.button("Submit"):
|
| 9 |
+
result = model_2.predict([[]])
|
| 10 |
+
st.write(f"The predicted price of the rental house is {result}")
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
# age = st.number_input("Enter age",min_value=0,max_value=1000,step=1,format="%d" )
|
| 14 |
+
# gender = st.radio("Enter gender",['Male','Female'])
|
| 15 |
+
# chestpain = st.selectbox("chestpain",['non-anginal_pain', 'typical_angina', 'atypical_angina','asymptomatic'])
|
| 16 |
+
# restingBP = st.number_input("Enter BP",min_value=0,max_value=1000,step=1,format="%d")
|
| 17 |
+
# serum_cholesterol = st.number_input("Enter serum_cholesterol",min_value=0,max_value=10000,step=1,format="%d")
|
| 18 |
+
# fasting_blood_sugar = st.radio("Enter fasting_blood_sugar",['yes','no'])
|
| 19 |
+
# restingrelectro= st.selectbox("Enter resting_electro",['ST-T_wave_abnormality', 'normal', 'left_ventricular_hypertrophy'])
|
| 20 |
+
# maxheartrate = st.number_input("Enter max_heart_rate",min_value=0,max_value=1000,step=1,format="%d")
|
| 21 |
+
# exerciseangia = st.radio("Enter exercise_angia",['yes','no'])
|
| 22 |
+
# oldpeak= st.number_input("Enter oldpeak")
|
| 23 |
+
# slope = st.selectbox("Enter slope",['downsloping', 'upsloping', 'flat'])
|
| 24 |
+
# noofmajorvessels = st.selectbox("enter number of major vessels",['Three', 'One', 'Zero', 'Two'])
|