File size: 1,042 Bytes
f7a33d3
85a5865
 
 
80df98a
 
bb1644c
80df98a
85a5865
80df98a
 
 
 
 
 
 
 
 
ad1c9cd
 
 
ec1c3e0
 
 
 
d3da53d
 
 
 
 
85a5865
ec1c3e0
d3da53d
 
ad1c9cd
 
ec1c3e0
 
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
28
29
30
31
32
33
34
35
36
37
38
import streamlit as st
import pickle

# Load the model
#with open('house_price_model.pkl', 'rb') as f:
#    model = pickle.load(f)
    
#st.title('House Price Prediction 🏡')
# User inputs
#living_area = st.number_input('Living Area (sqft)')
#bedrooms = st.number_input('Number of Bedrooms')

# Predict house price
#if st.button('Predict Price'):
#    prediction = model.predict([[living_area, bedrooms]])
#    st.write(f'Predicted House Price: ${prediction[0]:.2f}')




#Load the model
with open('best_model.pkl', 'rb') as f:
    model = pickle.load(f)

previous_rating = st.text_input("Previous Rating", "")
kpi_met = st.text_input("KPI Met 80", "")
awards_won = st.text_input("Awards Won", "")
avg_train_score = st.text_input("AVG Train Score", "")


# Predict house price
if st.button('Predict Promosi'):
    prediction = model.predict([[previous_rating, kpi_met, awards_won, avg_train_score]])
    st.write(f'Predicted Result: {prediction[0]}')


#import sklearn
#st.text('The scikit-learn version is {}.'.format(sklearn.__version__))