| 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__)) |