import streamlit as st import numpy as np import pickle import streamlit.components.v1 as components # Load the pickled model def load_model(): return pickle.load(open('Mobile_Price_Prediction_LogisticRegression.pkl', 'rb')) # Function for model prediction def model_prediction(model, features): predicted = str(model.predict(features)[0]) return predicted def app_design(): # Add input fields for High, Open, and Low values image = '53.png' st.image(image, use_column_width=True) st.subheader("Enter the following values:") battery_power = st.number_input("Battery Power") blue = st.number_input("Bluetooth") clock_speed = st.number_input("Clock Speed") dual_sim = st.number_input("Dual Sim") fc = st.number_input("front camera") four_g = st.number_input("4G") int_memory = st.number_input("Int Memory") m_dep = st.number_input("Mobile Dep") mobile_wt = st.number_input("Mobile Weight") n_cores = st.number_input("No. of Cores") pc = st.number_input("Primary camera") px_height = st.number_input("PX Height") px_width = st.number_input("PX Width") ram = st.number_input("RAM") sc_h = st.number_input("SC Height") sc_w = st.number_input("SC width") talk_time = st.number_input("Talk Time") three_g = st.number_input("3G") touch_screen = st.number_input("Touch Screen") wifi = st.number_input("Wifi") # Create a feature list from the user inputs features = [[battery_power,blue,clock_speed,dual_sim,fc,four_g,int_memory,m_dep,mobile_wt,n_cores,pc,px_height,px_width,ram,sc_h,sc_w,talk_time,three_g,touch_screen,wifi]] # Load the model model = load_model() # Make a prediction when the user clicks the "Predict" button if st.button('Predict Model'): predicted_value = model_prediction(model, features) if predicted_value=='0': st.success('The Mobile Price is Low') elif predicted_value=='1': st.success('The Mobile Price is Medium') elif predicted_value=='2': st.success('The Mobile Price is High') else: st.success('The Mobile Price is Very High') def about_hidevs(): components.html("""
🔍 Seeking the perfect job? HiDevs Community is your gateway to career success in the tech industry. Explore free expert courses, job-seeking support, and career transformation tips.
đź’Ľ We offer an upskill program in Gen AI, Data Science, Machine Learning, and assist startups in adopting Gen AI at minimal development costs.
🆓 Best of all, everything we offer is completely free! We are dedicated to helping society.
Book free of cost 1:1 mentorship on any topic of your choice — topmate
✨ We dedicate over 30 minutes to each applicant’s resume, LinkedIn profile, mock interview, and upskill program. If you’d like our guidance, check out our services here
đź’ˇ Join us now, and turbocharge your career!