credir_card / app.py
foreversheikh's picture
Upload 10 files
a00bcb4 verified
import streamlit as st
import pandas as pd
import numpy as np
import joblib
import pickle
import os
cwd=os.getcwd()
st.markdown("<h1 style=color:blue;>Welcome to the Credit Card Froud Detaction</h1>", unsafe_allow_html=True)
# model_path = os.path.join(cwd, "App\Decision_Tree.joblib")
# model = joblib.load(model_path)
with open(os.path.join(cwd, "App", "App\model.pkl"), "rb") as f:
model = pickle.load(f)
with open(os.path.join(cwd, "App", "scaler.pkl"), "rb") as f:
scl = pickle.load(f)
# Load city label encoder
with open(os.path.join(cwd, "App", "city_le.pkl"), "rb") as f:
city_labeling = pickle.load(f)
# Load category label encoder
with open(os.path.join(cwd, "App", "category_le.pkl"), "rb") as f:
category_labeling = pickle.load(f)
# Load gender label encoder
with open(os.path.join(cwd, "App", "gender_le.pkl"), "rb") as f:
gender_labeling = pickle.load(f)
# Load job label encoder
with open(os.path.join(cwd, "App", "job_le.pkl"), "rb") as f:
job_labeling = pickle.load(f)
# Load state label encoder
with open(os.path.join(cwd, "App", "state_le.pkl"), "rb") as f:
state_labeling = pickle.load(f)
category = st.selectbox("Select Category",
('personal_care', 'health_fitness', 'misc_pos', 'travel',
'kids_pets', 'shopping_pos', 'food_dining', 'home',
'entertainment', 'shopping_net', 'misc_net', 'grocery_pos',
'gas_transport', 'grocery_net'),
index=0,placeholder='Select Category')
gender = st.selectbox("Select Gender",
('M', 'F'),
index=0,placeholder='Select Gender')
state = st.selectbox("Select State",('SC', 'UT', 'NY', 'FL', 'MI', 'CA', 'SD', 'PA', 'TX', 'KY', 'WY',
'AL', 'LA', 'GA', 'CO', 'OH', 'WI', 'VT', 'AR', 'NJ', 'IA', 'MD',
'MS', 'KS', 'IL', 'MO', 'ME', 'TN', 'DC', 'AZ', 'MT', 'MN', 'OK',
'WA', 'WV', 'NM', 'MA', 'NE', 'VA', 'ID', 'OR', 'IN', 'NC', 'NH',
'ND', 'CT', 'NV', 'HI', 'RI', 'AK'),
index=0,placeholder='Select State')
city = st.selectbox("Select City",('Columbia', 'Altonah', 'Bellmore', 'Titusville', 'Falmouth',
'Breesport', 'Carlotta', 'Spencer', 'Morrisdale', 'Prairie Hill',
'Westport', 'Fort Washakie', 'Loxahatchee', 'Rock Tavern', 'Jones',
'Deltona', 'Key West', 'Grandview', 'Saint Amant', 'Clarks Mills',
'Alpharetta', 'Colorado Springs', 'Greenville', 'Tomahawk',
'Goodrich', 'Daly City', 'South Londonderry', 'Lepanto',
'New Waverly', 'New York City', 'Pewee Valley', 'Plainfield',
'Belmond', 'Bagley', 'Manchester', 'Sontag', 'Hawthorne',
'Gadsden', 'Birmingham', 'Ollie', 'Baton Rouge', 'San Antonio',
'Southfield', 'Mc Cracken', 'Purmela', 'Lomax', 'Tuscarora',
'Sunflower', 'Ogdensburg', 'Redford', 'Brooklin', 'Fields Landing',
'Rocky Mount', 'Port Saint Lucie', 'Graniteville', 'Tiptonville',
'Washington', 'Clearwater', 'Brooklyn', 'Superior', 'Glendale',
'Hudson', 'Rock Springs', 'Hurley', 'Fort Myers', 'Turner',
'Smiths Grove', 'Elizabeth', 'Bauxite', 'Sachse', 'Emmons',
'New Holstein', 'Saint Petersburg', 'Cokeburg', 'Roosevelt',
'Centerview', 'Conway', 'Tallmansville', 'Ruidoso',
'Oriskany Falls', 'Elk Rapids', 'Monmouth Beach',
'North Brookfield', 'Mount Saint Joseph', 'Sprague', 'Cass',
'Cord', 'Shenandoah Junction', 'New Ellenton', 'Munith', 'De Witt',
'Cuyahoga Falls', 'Drakes Branch', 'Romulus', 'Tyaskin',
'Philadelphia', 'North Loup', 'Hartford', 'Moriarty', 'Eureka',
'Wheaton', 'Amanda', 'Altair', 'Ratcliff', 'Murfreesboro',
'Plantersville', 'Pembroke Township', 'Lahoma', 'Phoenix',
'Leonard', 'Kittery Point', 'East Andover', 'Meridian', 'Bowdoin',
'Dallas', 'Espanola', 'Sherman', 'Aledo', 'Weeping Water',
'Norwalk', 'Creola', 'Arcadia', 'Eugene', 'Fulton', 'Helm',
'Sutherland', 'Egan', 'Lakeland', 'Thomas', 'Holstein',
'Battle Creek', 'Deane', 'Ragland', 'Norman Park',
'North Washington', 'Lake Jackson', 'Corriganville', 'Milford',
'Hannawa Falls', 'Union', 'Sterling City', 'Smock', 'Muskegon',
'Dayton', 'Sun City', 'Andrews', 'Spirit Lake', 'Ruckersville',
'Wilmington', 'Henderson', 'Rossville', 'Altona',
'Linthicum Heights', 'Heidelberg', 'Tickfaw', 'Shippingport',
'Mendon', 'Ashfield', 'Littleton', 'Matawan', 'Premier',
'Greenwich', 'Center Tuftonboro', 'Summerfield', 'Cedar',
'University', 'Winger', 'De Lancey', 'Cottekill', 'Mooresville',
'Blairstown', 'Oxford', 'Fordoche', 'Issaquah', 'Johns Island',
'Laguna Hills', 'Lithopolis', 'Spring Church', 'South Hero',
'Unionville', 'Moulton', 'Arnold', 'New Goshen', 'Port Costa',
'Norman', 'Wittenberg', 'Mayersville', 'Tekoa', 'Kingsport',
'Bessemer', 'Manistique', 'Falconer', 'Hinckley', 'Port Ewen',
'Hopkins', 'Hooper', 'Cecilton', 'Kansas City', 'Burrton',
'Haines City', 'Surrency', 'Grover', 'Warren', 'West Harrison',
'Woodville', 'Center Point', 'Thida', 'Humble', 'Hovland',
'Oklahoma City', 'Zavalla', 'Cazenovia', 'Annapolis', 'Hancock',
'Scotia', 'Heart Butte', 'Marathon', 'Corona', 'Houston',
'Halstad', 'Topeka', 'Grand Bay', 'Montrose', 'Esbon', 'Leo',
'Stanchfield', 'Mobile', 'Burlington', 'Lohrville', 'Achille',
'Dadeville', 'Dublin', 'Etlan', 'Ridgeland', 'Leetsdale',
'Methuen', 'Ford', 'Jordanville', 'Cleveland', 'Payson',
'Elizabethtown', 'Lorenzo', 'Edmond', 'Santa Monica', 'Kirk',
'Belgrade', 'Bryant', 'Delhi', 'Logan', 'Orient', 'San Jose',
'Kingsford Heights', 'Alton', 'Baroda', 'Basye', 'Oakland',
'Marienville', 'Fairview', 'Tupper Lake', 'West Sayville', 'Uledi',
'Brandon', 'Alexandria', 'Lagrange', 'Westhampton Beach', 'Gretna',
'Sheffield', 'Mifflin', 'Jermyn', 'Lonsdale', 'Rochester',
'Ranier', 'Lowville', 'Newark Valley', 'Grant', 'Boulder',
'Clarksville', 'Great Mills', 'Tulsa', 'Sacramento', 'Moorhead',
'Wilton', 'Olmsted', 'Christine', 'Cochranton', 'Nokomis', 'May',
'Naples', 'Riverton', 'Jackson', 'Keller', 'Ronceverte',
'Nazareth', 'Jelm', 'Valentine', 'Clay Center', 'Lebanon',
'Moundsville', 'Wendel', 'Kensington', 'Kilgore', 'Utica',
'Sebring', 'Winthrop', 'Port Richey', 'Clarinda', 'Hedley',
'West Bethel', 'Cascade Locks', 'Churubusco', 'Diamond',
'Knoxville', 'Schaefferstown', 'Waupaca', 'Eldridge',
'Edisto Island', 'Higganum', 'Girard', 'Lawn', 'Collettsville',
'Gibsonville', 'Tyler', 'Saxon', 'Afton', 'Pearlington',
'Yellowstone National Park', 'Ballwin', 'Mount Perry',
'West Green', 'Bay City', 'Wetmore', 'Lima', 'Melbourne', 'Roma',
'Greenwood', 'Kirtland Afb', 'Brownville', 'Mesa', 'Newhall',
'Kirby', 'Bridger', 'Brunson', 'Grassflat', 'Dieterich', 'Loving',
'Canton', 'Albany', 'West Decatur', 'Reno', 'Schaumburg',
'Grenada', 'Mill Creek', 'Cranks', 'Farmington', 'Detroit',
'Iselin', 'Shields', 'Manville', 'Allentown', 'Meadville',
'Whigham', 'Dunlevy', 'Cisco', 'Hatch', 'Oconto Falls',
'Coffeeville', 'Paint Rock', 'Red River', 'Port Charlotte',
'Brantley', 'Belfast', 'East Canaan', 'Parks', 'Bronx',
'Bethel Springs', 'Holcomb', 'Port Gibson', 'Sauk Rapids',
'Williamsburg', 'Sula', 'Steuben', 'Randolph', 'Vanderbilt',
'Dongola', 'Rule', 'Highland', 'Big Creek', 'Hinesburg', 'Halma',
'Juliette', 'Doe Hill', 'New Boston', 'Belmont', 'Murrayville',
'Bolivar', 'Lowell', 'West Palm Beach', 'Coyle', 'West Hartford',
'Mount Hope', 'Smith River', 'Stephensport', 'Pomona',
'Cape Coral', 'Moab', 'Luzerne', 'Nobleboro', 'Aurora',
'Grand Ridge', 'San Diego', 'Wauchula', 'West Columbia',
'Heiskell', 'Putnam', 'Dexter', 'White Sulphur Springs',
'Fiddletown', 'Hedrick', 'Holliday', 'Bolton', 'North Haverhill',
'Greendale', 'Indianapolis', 'Cadiz', 'Lonetree', 'Los Angeles',
'Joliet', 'Kissee Mills', 'Garrattsville', 'Auburn', 'Armonk',
'Spearsville', 'Gaithersburg', 'Shelter Island', 'Galatia',
'Lakeview', 'Burke', 'Iliff', 'Haw River', 'Hurricane', 'Hills',
'Ozawkie', 'Prosperity', 'West Monroe', 'Ruth', 'Viola',
'Old Hickory', 'Atlantic', 'Mountain Park', 'West Long Branch',
'Armagh', 'Lamberton', 'Tryon', 'Cross', 'Downsville',
'Indian Wells', 'El Paso', 'Harrodsburg', 'Cassatt',
'Grand Junction', 'Odessa', 'Newberg', 'Ringwood', 'Carlisle',
'Ironton', 'Red Cliff', 'East Troy', 'Keisterville', 'Coleman',
'Mansfield', 'Thrall', 'Umatilla', 'Whaleyville', 'Harper',
'Manley', 'Creedmoor', 'Avoca', 'Moravian Falls', 'Paauilo',
'Georgetown', 'Walnut Ridge', 'Texarkana', 'Orr', 'Corsica',
'Michigan', 'Beaver Falls', 'Minneapolis', 'Thompson', 'Ash Flat',
'Grimesland', 'North Wilkesboro', 'Waynesfield', 'Acworth',
'Damascus', 'Karnack', 'Elkhart', 'Cardwell', 'Westerville',
'Mound City', 'Coleharbor', 'Louisville', 'Freedom', 'Pikesville',
'Wilmette', 'Camden', 'Lanark Village', 'Darien', 'Cromona',
'West Eaton', 'Independence', 'River', 'Elberta', 'Athena',
'Cuthbert', 'Pointe Aux Pins', 'Pittsburgh', 'Arlington',
'Bristow', 'Lakeport', 'Deadwood', 'Smackover', 'Carroll',
'Winfield', 'Bonita Springs', 'Duncan', 'Sturgis', 'Tampa',
'Slayden', 'Tomales', 'Wichita', 'Saint Bonaventure',
'Bowersville', 'Ferney', 'O Brien', 'Florence', 'Barnard',
'Greenview', 'Saint James City', 'Enola', 'Brashear', 'Irwinton',
'Fenelton', 'June Lake', 'Des Moines', 'Mc Veytown', 'Avera',
'Bradley', 'Glade Spring', 'Stirling', 'Haynes', 'West Finley',
'Bay Minette', 'Pelham', 'Scotland', 'Ehrhardt', 'Saint Paul',
'Jefferson', 'Hazel', 'Watertown', 'Laramie', 'Plymouth', 'Seneca',
'Oolitic', 'Clifton', 'Mallie', 'Holloway', 'Richland', 'Clayton',
'Roseland', 'Tamaroa', 'Campbell', 'Emporium', 'Burbank',
'De Soto', 'Parsonsfield', 'Chester Heights', 'Springfield',
'Oak Hill', 'Paradise Valley', 'Cross Plains', 'Noonan', 'Napa',
'Goreville', 'East Rochester', 'Zaleski', 'Powell', 'Barneveld',
'Moores Hill', 'Boonton', 'Harmony', 'Monetta', 'Falls Church',
'Sixes', 'North Tonawanda', 'Harrington Park', 'Tower Hill',
'Laredo', 'Catawba', 'Brinson', 'Huntsville', 'Eagarville',
'Gardiner', 'Montgomery', 'Lawrence', 'Irvine', 'Early', 'Pueblo',
'Reynolds', 'Lake Oswego', 'Rhame', 'Vancouver', 'Pecos', 'Mounds',
'Blackville', 'Scarborough', 'Big Indian', 'Dumont', 'Montandon',
'Saint Francis', 'New Memphis', 'Howes Cave', 'Lane',
'North Judson', 'Atglen', 'Mc Nabb', 'Williams', 'Queenstown',
'Blooming Grove', 'Maysville', 'Fullerton', 'Cherokee Village',
'Fayetteville', 'Webster City', 'Notrees', 'Colton', 'Browning',
'Republic', 'Winslow', 'Stillwater', 'Providence', 'Shedd',
'Malad City', 'Bridgeport', 'Benton', 'Clune', 'Denham Springs',
'Glen Rock', 'Akron', 'Trenton', 'Manquin', 'North Augusta',
'Beasley', 'Falls City', 'Stittville', 'Whittemore', 'Bristol',
'Oaks', 'Mountain Center', 'Vero Beach', 'Mulberry Grove',
'Central', 'Humboldt', 'Marietta', 'Powell Butte', 'Hewitt',
'Valdosta', 'Oakdale', 'Albuquerque', 'Liberty Mills', 'Riverview',
'Howells', 'Kent', 'West Henrietta', 'Bailey',
'Springfield Gardens', 'Edinburg', 'Barnstable', 'Shrewsbury',
'Saint Louis', 'Meredith', 'Burns Flat', 'Comfort', 'Dalton',
'Margaretville', 'Comfrey', 'Maria Stein', 'Palermo',
'American Fork', 'Brainard', 'Grantham', 'De Queen', 'Ashford',
'Vienna', 'Westfir', 'Paulding', 'Milwaukee', 'Wales',
'Blairsden-Graeagle', 'Hopewell', 'Jaffrey', 'Cowlesville',
'Omaha', 'Luray', 'North Prairie', 'Washington Court House',
'Belle Fourche', 'High Rolls Mountain Park', 'Hahira', 'Rockwell',
'Rockwood', 'Oakford', 'Norwich', 'Washoe Valley', 'Daniels',
'Bynum', 'Sea Island', 'Bethel', 'Portland', 'Stayton', 'Chester',
'Collegeville', 'Miamisburg', 'Mount Morris', 'Nelson',
'Beaverdam', 'Hawley', 'Kings Bay', 'Minnesota Lake', 'Fairhope',
'South Richmond Hill', 'Boyd', 'Allenhurst', 'Marion',
'Phenix City', 'Alder', 'Lolita', 'Orangeburg', 'Timberville',
'North Las Vegas', 'Harborcreek', 'Alva', 'Kenner', 'Milner',
'Lubbock', 'Owensville', 'Varnell', 'Prairie Creek', 'Winter',
'Broomfield', 'Vinton', 'Sardis', 'Bonfield', 'Harwood', 'Quanah',
'Gregory', 'Crownpoint', 'Honokaa', 'Garfield', 'Parker',
'San Angelo', 'Amsterdam', 'Livonia', 'Louisiana', 'Cressona',
'Hampton', 'Phil Campbell', 'Rumely', 'Manderson', 'Moro',
'Mount Clemens', 'Palmyra', 'Easton', 'Pembroke', 'Paxton',
'Newport', 'Huslia', 'Waukesha', 'Curlew', 'Matthews', 'Paris',
'Gainesville', 'Lamy', 'Moriches', 'Mc Clellandtown', 'Thornville',
'Llano', 'Azusa', 'Princeton', 'Heislerville', 'Parker Dam',
'Arvada', 'Northport', 'Rosewood', 'Scotts Mills', 'Spring',
'Newton', 'Jay', 'Skytop', 'Kingsville', 'Mc Intosh',
'Knowlesville', 'Bigelow', 'Adams', 'Loami', 'Greenbush',
'Chatham', 'Du Pont', 'Woods Cross', 'Rock Glen', 'New Franken',
'Veedersburg', 'Huntington Beach', 'Parkers Lake', 'Smithfield',
'Dell City', 'Desdemona', 'Amorita', 'Remer', 'Dubre', 'Metairie',
'Manor', 'Clutier', 'Dresden', 'Monitor', 'Jordan Valley',
'Apison', 'Ravenna', 'Palmdale', 'Moscow', 'West Chazy', 'Oran',
'Springville', 'Stoneham', 'Claremont', 'Pea Ridge', 'Preston',
'Syracuse', 'Rice', 'Grifton', 'Lexington', 'Kirkwood', 'Kirtland',
'Morrowville', 'Seligman', 'Seattle', 'Wever', 'Guthrie', 'Craig',
'Senatobia'),
index=0,placeholder='Select Property Type')
job = st.selectbox("Select Job",('Mechanical engineer', 'Sales professional, IT',
'Librarian, public', 'Set designer', 'Furniture designer',
'Psychotherapist', 'Therapist, occupational',
'Development worker, international aid', 'Advice worker',
'Barrister', 'Pensions consultant', 'Freight forwarder',
'Paramedic', 'Building surveyor', 'Materials engineer',
'Commercial horticulturist', 'Town planner',
'Radiographer, therapeutic', 'Surveyor, rural practice',
'Energy manager', 'Prison officer',
'Museum/gallery exhibitions officer', 'Media planner',
'Seismic interpreter', 'Learning disability nurse',
'Buyer, industrial', 'Scientific laboratory technician',
'Counselling psychologist', 'Scientist, biomedical',
'Audiological scientist', 'Stage manager',
'Leisure centre manager', 'Community pharmacist', 'Risk analyst',
'Clinical research associate', 'Librarian, academic',
'Editor, magazine features', 'Ceramics designer', 'Musician',
'Designer, furniture', 'Exhibition designer',
'Engineer, automotive', 'Film/video editor', 'Web designer',
'Environmental consultant', 'Production assistant, television',
'Education officer, community',
'Senior tax professional/tax inspector', 'Investment analyst',
'Loss adjuster, chartered', 'Scientist, audiological',
'Tax inspector', 'Primary school teacher',
'Agricultural consultant', 'Geochemist', 'Geneticist, molecular',
'Medical sales representative', 'Petroleum engineer',
'Advertising account planner', 'Travel agency manager',
'Music therapist', 'Neurosurgeon', 'Further education lecturer',
'Therapist, sports', 'Operational researcher', 'Site engineer',
'Communications engineer', 'Child psychotherapist',
'Engineer, land', 'Dealer', 'Amenity horticulturist',
'Electronics engineer', 'Research officer, political party',
'Accounting technician', 'Licensed conveyancer',
'Programmer, multimedia', 'Chief Financial Officer',
'Health promotion specialist', 'Field seismologist', 'Chiropodist',
'Special effects artist', 'Designer, ceramics/pottery',
'Systems developer', 'Biomedical scientist',
'Geophysicist/field seismologist', 'Electrical engineer',
'Equities trader', 'Energy engineer', 'Police officer',
'Music tutor', "Nurse, children's", 'Jewellery designer',
'Therapist, art', 'Archivist', 'Production manager',
'Farm manager', 'Editor, film/video', 'Engineer, production',
'Journalist, newspaper', 'Drilling engineer',
'Psychotherapist, child',
'Programme researcher, broadcasting/film/video', 'Contractor',
'Sub', 'Broadcast engineer', 'Animal nutritionist',
'Intelligence analyst', 'Engineer, electronics',
'Historic buildings inspector/conservation officer', 'Optometrist',
'Firefighter', 'Copywriter, advertising', 'Designer, jewellery',
'Scientist, physiological', 'Financial adviser',
'Early years teacher', 'Insurance broker', 'Broadcast presenter',
'Clothing/textile technologist', 'Probation officer',
'Forensic psychologist', 'Telecommunications researcher',
'Teacher, early years/pre',
'Conservation officer, historic buildings',
'Educational psychologist', 'Rural practice surveyor',
'Patent attorney', 'Futures trader', 'Hospital doctor',
'Chief Executive Officer', 'Chartered public finance accountant',
'Charity fundraiser', 'Information systems manager',
'Environmental manager', 'Designer, exhibition/display',
'Retail banker', 'English as a second language teacher',
'Building services engineer', 'Buyer, retail',
'Surveyor, land/geomatics', 'Conservator, furniture',
'Exhibitions officer, museum/gallery',
'Accountant, chartered public finance', 'Secretary/administrator',
'Production assistant, radio', 'Water engineer',
'Insurance risk surveyor', 'Optician, dispensing',
'Fisheries officer', 'Social research officer, government',
'Curator', 'Applications developer', 'Chartered accountant',
'Comptroller', 'Land', 'Control and instrumentation engineer',
'Community education officer', 'Osteopath', 'Surgeon',
'Sales executive', 'Lecturer, higher education',
'Public relations account executive', 'Transport planner',
'Investment banker, corporate', 'Camera operator',
'Land/geomatics surveyor', 'Engineer, mining',
'Armed forces training and education officer',
'Manufacturing engineer', 'Technical brewer', 'Warden/ranger',
'Radio broadcast assistant', 'Trade mark attorney', 'Metallurgist',
'Heritage manager', 'Podiatrist', 'Counsellor', 'Gaffer',
'Exercise physiologist', 'Engineer, technical sales',
'Toxicologist', 'Magazine features editor', 'Lexicographer',
'Editor, commissioning', 'Phytotherapist',
'Careers information officer', 'Tax adviser',
'Advertising copywriter', 'Occupational hygienist',
'Accountant, chartered certified', 'Press photographer',
'Wellsite geologist', 'Animator', 'Secondary school teacher',
'Race relations officer', 'Tourism officer', 'Biomedical engineer',
'Lecturer, further education', 'Public house manager',
'Administrator', 'Minerals surveyor',
'Scientist, clinical (histocompatibility and immunogenetics)',
'Administrator, education', 'Market researcher',
'Chief Operating Officer', 'Media buyer',
'Armed forces logistics/support/administrative officer',
'Civil engineer, contracting', 'Network engineer',
'Engineer, drilling', 'Multimedia programmer',
'Scientist, research (physical sciences)',
'Special educational needs teacher', 'Geoscientist',
'Psychologist, forensic', 'Horticulturist, commercial',
'Furniture conservator/restorer', 'Chartered loss adjuster',
'Tree surgeon', 'Scientist, marine',
'Product/process development scientist', 'Financial trader',
'Radio producer', 'Mining engineer',
'Training and development officer', 'Chief Strategy Officer',
'Theme park manager', 'Physiological scientist', 'Pathologist',
'Art therapist', 'Teacher, special educational needs',
'Television floor manager', 'Retail merchandiser',
'Corporate investment banker', 'Pilot, airline', 'Statistician',
'Public librarian', 'Insurance underwriter',
'Teacher, English as a foreign language', 'Physiotherapist',
'Teacher, adult education', 'Operations geologist',
'Environmental education officer', 'IT trainer',
'Research officer, trade union', 'Animal technologist',
'Air cabin crew', 'Designer, industrial/product',
'Engineer, civil (contracting)', "Politician's assistant",
'Conservator, museum/gallery', 'Soil scientist', 'Arboriculturist',
'Sports development officer', 'Television/film/video producer',
"Barrister's clerk", 'Engineer, communications', 'Copy',
'Water quality scientist', 'Immunologist',
'Database administrator', 'Producer, radio', 'Cartographer',
'Health physicist', 'Private music teacher', 'Social researcher',
'Pension scheme manager', 'Psychologist, clinical',
'Building control surveyor', 'Designer, textile', 'Barista',
'Claims inspector/assessor', 'Systems analyst',
'Structural engineer', 'Archaeologist',
'Psychologist, counselling', 'Cytogeneticist', 'Health visitor',
'Emergency planning/management officer',
'Scientist, research (maths)', 'Herbalist',
'Tourist information centre manager', 'Landscape architect',
'Paediatric nurse', 'Video editor', 'Quantity surveyor',
'Geologist, engineering', 'Therapist, drama', 'Doctor, hospital',
'Hydrographic surveyor', 'Glass blower/designer',
'Therapist, horticultural', 'Make', 'Physicist, medical',
'Community arts worker', 'Embryologist, clinical', 'Bookseller',
'Facilities manager', 'Theatre manager',
'Dance movement psychotherapist', 'Scientist, research (medical)',
'Commercial/residential surveyor',
'Administrator, local government', 'Development worker, community',
'Higher education careers adviser', 'Location manager',
'General practice doctor', 'Art gallery manager',
'Pharmacist, hospital', 'Teaching laboratory technician',
'Chemical engineer', 'Geologist, wellsite',
'Presenter, broadcasting', 'Community development worker',
'Immigration officer', 'Chief Technology Officer',
'Engineer, biomedical', 'Logistics and distribution manager',
'Academic librarian', 'Commissioning editor',
'Research scientist (physical sciences)',
'Teacher, secondary school', 'Engineer, agricultural',
'Naval architect', 'Clinical biochemist',
'Restaurant manager, fast food', 'Data scientist',
'Theatre director', 'Radiographer, diagnostic', 'Interpreter',
'Psychiatric nurse', 'Research scientist (life sciences)',
'Learning mentor', 'Lawyer',
'Outdoor activities/education manager', 'Human resources officer',
'Trading standards officer', 'Press sub',
'Regulatory affairs officer', 'Pharmacist, community',
'Engineering geologist', 'Engineer, control and instrumentation',
'Horticultural therapist', 'Maintenance engineer',
'Producer, television/film/video', 'Analytical chemist',
'Surveyor, minerals', 'Hydrologist',
'Manufacturing systems engineer', 'Dispensing optician',
'Product designer', 'Architect', 'Education officer, museum',
'Company secretary', 'Television production assistant',
'Science writer', 'Quarry manager', 'Fitness centre manager',
'Mudlogger', 'Medical physicist', 'Waste management officer',
'Occupational psychologist', 'Colour technologist', 'Fine artist',
'Call centre manager', 'Television camera operator',
'Sport and exercise psychologist', 'Health service manager',
'Interior and spatial designer', 'Nutritional therapist',
'Clinical psychologist', 'Programmer, applications',
'Retail manager', 'Engineer, materials', 'Diagnostic radiographer',
'Designer, interior/spatial', 'Herpetologist',
'Museum/gallery conservator', 'Nurse, mental health',
'Public affairs consultant', 'Management consultant',
'Industrial/product designer', 'Airline pilot', 'Retail buyer',
'Psychologist, sport and exercise', 'Ambulance person',
'Equality and diversity officer',
'Engineer, broadcasting (operations)', 'Plant breeder/geneticist',
'Engineer, maintenance', 'Chemist, analytical',
'Chief Marketing Officer', 'Visual merchandiser',
'Planning and development surveyor', 'Illustrator',
'Merchandiser, retail', 'Psychiatrist', 'Mental health nurse',
'Orthoptist', 'Magazine journalist', 'Doctor, general practice',
'Product manager', 'Advertising account executive',
'Surveyor, mining', 'Pharmacologist', 'Medical secretary',
'Aid worker', 'Cabin crew', 'Nature conservation officer',
'Public relations officer', 'Insurance claims handler',
'Investment banker, operational',
'Administrator, charities/voluntary organisations',
'Oceanographer', 'Therapist, music', 'Local government officer',
'Arts development officer', 'Biochemist, clinical',
'Civil Service administrator', 'Clinical cytogeneticist', 'Writer',
'Garment/textile technologist', 'Research scientist (maths)',
'Museum education officer', 'Teacher, primary school',
'Designer, multimedia', 'Textile designer',
'Civil Service fast streamer', 'Environmental health practitioner',
'Health and safety adviser', 'Designer, television/film set',
'Associate Professor',
'Chartered legal executive (England and Wales)',
'Purchasing manager', 'Surveyor, hydrographic',
'Hospital pharmacist', 'Research scientist (medical)',
'Engineer, structural', 'Field trials officer',
'Engineer, building services', 'Acupuncturist', 'Chief of Staff',
'Records manager', 'Catering manager', 'Event organiser',
'Engineer, petroleum', 'Production engineer',
'Education administrator', 'IT consultant',
'Horticultural consultant', 'Ecologist', 'Engineer, aeronautical',
'Volunteer coordinator', 'Air broker',
'Engineer, civil (consulting)', 'Estate manager/land agent',
'Aeronautical engineer', 'Engineer, manufacturing',
'Architectural technologist', 'Marketing executive',
'Hotel manager', 'Tour manager', 'Professor Emeritus',
'Oncologist', 'TEFL teacher', 'Economist',
'English as a foreign language teacher', 'Hydrogeologist',
'Medical technical officer', 'Charity officer',
'Administrator, arts', 'Occupational therapist',
'Solicitor, Scotland', 'Sports administrator', 'Artist',
'Engineer, water', 'Operational investment banker',
'Software engineer'),
index=0,placeholder='Select Job')
zip = st.selectbox("Select zip",(29209, 84002, 11710, 32780, 49632, 14816, 95528, 57374, 16858,76678, 40077, 82514, 33470, 12575, 36749, 32725, 33040, 76050,70774, 16114, 30009, 80951, 45331, 54487, 48438, 94015, 5155,72354, 77358, 10162, 40056, 7060, 50421, 53801, 21102, 39665,
90250, 35903, 35229, 52576, 70808, 78248, 48034, 67556, 76566,61454, 21790, 38778, 7439, 63665, 4616, 95537, 65072, 34953,5654, 38079, 20036, 33760, 11217, 85173, 91206, 12534, 82901,
57036, 33967, 59542, 42171, 7208, 72011, 75048, 56029, 53061,
33710, 15324, 73564, 64019, 98238, 26237, 88355, 13425, 49629,
7750, 1535, 45051, 68438, 24927, 72524, 25442, 29809, 49259,
72042, 44223, 23937, 48174, 21865, 19154, 68859, 36344, 87035,
61530, 64874, 43102, 77412, 75858, 37132, 36758, 60958, 73754,
85020, 75452, 3905, 4226, 83646, 4287, 75218, 87533, 75092,
76008, 68463, 90650, 45622, 49613, 97403, 57340, 93627, 69165,
70531, 33811, 67545, 26292, 68950, 51006, 41812, 35131, 31771,
16048, 77566, 21524, 45150, 13647, 24983, 76951, 15480, 49440,
45415, 92585, 46702, 83869, 22968, 28405, 25106, 60963, 12910,
21090, 39439, 70466, 15077, 84325, 1330, 80120, 7747, 24878,
8323, 3816, 79085, 49621, 38677, 56592, 13752, 12419, 78214,
28117, 64726, 48371, 70732, 98027, 29455, 3818, 92637, 43136,
15686, 5486, 63565, 52572, 52535, 63010, 47863, 94569, 71960,
54499, 39113, 99033, 37663, 35022, 49854, 14733, 85086, 44233,
12466, 29061, 68031, 21913, 64114, 67020, 33844, 31563, 28073,
44483, 10604, 35776, 26339, 76665, 72165, 77338, 55606, 73134,
75980, 53924, 21405, 21750, 29939, 59448, 79842, 92882, 77026,
56548, 77007, 66618, 36541, 10548, 66941, 46765, 55080, 36617,
98233, 51453, 74720, 36853, 18917, 22719, 39157, 15056, 1844,
23850, 13361, 77327, 62360, 42701, 79343, 73034, 90403, 80824,
59714, 54418, 71232, 62856, 99160, 95148, 46346, 51003, 49101,
22810, 38060, 16239, 7022, 12986, 11796, 15484, 5733, 22311,
82221, 11978, 70056, 1257, 17058, 18433, 33510, 55046, 42273,
56668, 13367, 13811, 35747, 59632, 35901, 37040, 20634, 74131,
95827, 38761, 58579, 62970, 58015, 16314, 62075, 76857, 34112,
82501, 39211, 76248, 24970, 79063, 82063, 69201, 43408, 24266,
26041, 96136, 20895, 75662, 64686, 33872, 4364, 34668, 51632,
79237, 4286, 97014, 46723, 29320, 44412, 37932, 17088, 54981,
35554, 29438, 6441, 30426, 17041, 28611, 27249, 75703, 54559,
55001, 39572, 82190, 63021, 44857, 43760, 31567, 48706, 49895,
45801, 32935, 78584, 46143, 87117, 13615, 83643, 91321, 43330,
59014, 29911, 16839, 62424, 88256, 44702, 67584, 12222, 94619,
16878, 89512, 60193, 96038, 19149, 17060, 48088, 40820, 14425,
48214, 8830, 58569, 82227, 18103, 10039, 64659, 39897, 15432,
61830, 84735, 54154, 38922, 35764, 87558, 11957, 33981, 36009,
14711, 6024, 86018, 10463, 38315, 67851, 14537, 56379, 63388,
59871, 4680, 55065, 44265, 15486, 62926, 79548, 46322, 40914,
5461, 56729, 74130, 43321, 31046, 24433, 61272, 3220, 62668,
15923, 97452, 33417, 73027, 5084, 35651, 95567, 40170, 10970,
33909, 84532, 48636, 4555, 80014, 32442, 92128, 33873, 29170,
37754, 61560, 67038, 24986, 95629, 52563, 76366, 28423, 3774,
53129, 46290, 42211, 82936, 90014, 60432, 65680, 13342, 4210,
10504, 71277, 20882, 11964, 62935, 48850, 22015, 80736, 27258,
25526, 56138, 66070, 29127, 71291, 89319, 75238, 72583, 37138,
23303, 73559, 7764, 15920, 56152, 74875, 29436, 13755, 92210,
79906, 47434, 29032, 38039, 64076, 73669, 97132, 60072, 47838,
45638, 81649, 53120, 15449, 48206, 76834, 44902, 76578, 32784,
21872, 78631, 68403, 27522, 51521, 28654, 96776, 56546, 72476,
71854, 55771, 15829, 58259, 15010, 55428, 84540, 72513, 46254,
27837, 28659, 45896, 3601, 24236, 75661, 50073, 63829, 68881,
64470, 58531, 40209, 83120, 21208, 60091, 13316, 32323, 31305,
41810, 13484, 64058, 41254, 49628, 55403, 97813, 39840, 49775,
15217, 22213, 47515, 95453, 57732, 71762, 68723, 25213, 34135,
38740, 39769, 33620, 37165, 94971, 67232, 97107, 14778, 45307,
57439, 79539, 39073, 57426, 96037, 75210, 33956, 72047, 63533,
31042, 16034, 93529, 50314, 17051, 30803, 29819, 24340, 7980,
72341, 15377, 36507, 48221, 27311, 20687, 29081, 55128, 12093,
42049, 55388, 82072, 6782, 54654, 47451, 29324, 41836, 43985,
8350, 74536, 68973, 62888, 68932, 15834, 99323, 66018, 4047,
19017, 31329, 12460, 85253, 76443, 58765, 94558, 62939, 14445,
45698, 37849, 13304, 47032, 7005, 16037, 29105, 22046, 97476,
14120, 7640, 62571, 78040, 24070, 39825, 35811, 33809, 62023,
97441, 36111, 64017, 75236, 1843, 16329, 50535, 81005, 58275,
97034, 58651, 98665, 79772, 74047, 29817, 4074, 12410, 80436,
14707, 17850, 40062, 62266, 12092, 74555, 46366, 19310, 61335,
47470, 21658, 76626, 41056, 68638, 72529, 28314, 50595, 79759,
35049, 99113, 64630, 49879, 72959, 74074, 2908, 97377, 83252,
8014, 53803, 15727, 70726, 17327, 44307, 75490, 23106, 29860,
77417, 78113, 13469, 50598, 19007, 40336, 19456, 92561, 32960,
62262, 47110, 86329, 49705, 29661, 97753, 54441, 95842, 31605,
28901, 11769, 87109, 33813, 46946, 66616, 48193, 16362, 68641,
97033, 14586, 27807, 11413, 20012, 22824, 2630, 1545, 74633,
63131, 67216, 81642, 73624, 25049, 53926, 12455, 56019, 45860,
48202, 58769, 84003, 68626, 3753, 71832, 40202, 98304, 31092,
97492, 45879, 53228, 99783, 96103, 23860, 3452, 14037, 68117,
63453, 53153, 43160, 57717, 20017, 88325, 31632, 50469, 15557,
75934, 62673, 43767, 89704, 25832, 76631, 31561, 45106, 97210,
97383, 21619, 56321, 45342, 14510, 68961, 45808, 56549, 27358,
31547, 56068, 36532, 11419, 54726, 7711, 6444, 36869, 59710,
77971, 10280, 10962, 22853, 89084, 16421, 82711, 70062, 30257,
79413, 65066, 30756, 47869, 54896, 80021, 22151, 96135, 36775,
60913, 20776, 79252, 72059, 50312, 87313, 96727, 35803, 67529,
80138, 76905, 43903, 63336, 48154, 63353, 17929, 23666, 39653,
35581, 49826, 57756, 62067, 48043, 14522, 66020, 28372, 1612,
4953, 99746, 53186, 50527, 63867, 38949, 76240, 87540, 11955,
15458, 92101, 43076, 87543, 91702, 52768, 8324, 92267, 80005,
11768, 43070, 97375, 77379, 3858, 32565, 18357, 32044, 21087,
57641, 14479, 56117, 53910, 62661, 23357, 44804, 12037, 31630,
84087, 18246, 54229, 31003, 47987, 92648, 42634, 61477, 79837,
76445, 73719, 56672, 42731, 70003, 15665, 52217, 67635, 98836,
87116, 33404, 97910, 37302, 68869, 93552, 52760, 12992, 50664,
14141, 2180, 91711, 72751, 34120, 6365, 65354, 56367, 28530,
22204, 35211, 40502, 13795, 87417, 66958, 65745, 98118, 52658,
73044, 99921, 38668),
index=0,placeholder='Select zip')
amt = st.number_input("Enter Amt",value=0.0)
lat = st.number_input("Enter Lat",value=0.0)
long = st.number_input("Select Long",value=0.0)
city_pop = st.number_input("Enter City pop",value=0.0)
merch_lat = st.number_input("Enter Merch_lat",value=0.0)
merch_long = st.number_input("Enter Merch_long",value=0.0)
data_dict = {
"category": category,
"amt": amt,
"gender": gender,
"city": city,
"state": state,
"zip": zip,
"lat": lat,
"long": long,
"city_pop": city_pop,
"job": job,
"merch_lat": merch_lat,
"merch_long": merch_long
}
x=pd.DataFrame([data_dict])
x["city"]=city_labeling.transform(x["city"])
x["category"]=category_labeling.transform(x["zipcode"])
x["gender"]=gender_labeling.transform(x["property_type"])
x["job"]=job_labeling.transform(x["room_type"])
x["state"]=state_labeling.transform(x["location_group"])
x=scl.transform(x)
z=model.predict(x)
if st.button("Predict Price"):
st.success(f"Price is {float(z)}")