prudhvippr commited on
Commit
e088a9a
·
verified ·
1 Parent(s): fa362bd

Upload 3 files

Browse files
Files changed (3) hide show
  1. Script.py +30 -0
  2. estimator1.pkl +3 -0
  3. requirements.txt +49 -0
Script.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ import numpy as np
3
+ #from matplotlib import pyplot as plt
4
+ #import seaborn as sns
5
+ import sklearn
6
+ from sklearn.preprocessing import RobustScaler, StandardScaler, OneHotEncoder, OrdinalEncoder, PowerTransformer
7
+ from sklearn.compose import ColumnTransformer
8
+ from sklearn.pipeline import Pipeline
9
+ from sklearn.model_selection import train_test_split
10
+ from sklearn.linear_model import LinearRegression
11
+ import pickle
12
+ import streamlit as st
13
+
14
+ st.image("https://www.innomatics.in/wp-content/uploads/2023/01/Innomatics-Logo1.png")
15
+ st.title("Diamond Price Prediction")
16
+
17
+ carat = st.number_input("Enter the carat value")
18
+ cut = st.text_input("Enter the cut of the diamond")
19
+ color = st.text_input("Enter the color code of the diamond")
20
+ clarity = st.text_input("Enter the clarity code")
21
+ depth = st.number_input("Enter the depth of the diamond")
22
+ table = st.number_input("Enter the table value")
23
+ x = st.number_input("Enter the length of diamond")
24
+ y = st.number_input("Enter the width of the diamond")
25
+ z = st.number_input("Enter the z of the diamond")
26
+
27
+ model_1 = pickle.load(open(r"C:\\Users\\Dream\\Downloads\\estimator1.pkl","rb")) #pickle file path
28
+ if st.button("Submit"):
29
+ result = model_1.predict([[carat,cut,color,clarity,depth,table,x,y,z]])
30
+ st.write(f"The predicted price of the diamond is {result}")
estimator1.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cda5795da45751bfcd41ca41041cf8cd0e9b3d977a5000f9a8851cdd08fd9803
3
+ size 3835
requirements.txt ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ altair 5.5.0
3
+ attrs 24.2.0
4
+ blinker 1.9.0
5
+ cachetools 5.5.0
6
+ certifi 2024.8.30
7
+ charset-normalizer 3.4.0
8
+ click 8.1.7
9
+ colorama 0.4.6
10
+ gitdb 4.0.11
11
+ GitPython 3.1.43
12
+ idna 3.10
13
+ Jinja2 3.1.4
14
+ joblib 1.4.2
15
+ jsonschema 4.23.0
16
+ jsonschema-specifications 2024.10.1
17
+ markdown-it-py 3.0.0
18
+ MarkupSafe 3.0.2
19
+ mdurl 0.1.2
20
+ narwhals 1.18.3
21
+ numpy 2.2.0
22
+ packaging 24.2
23
+ pandas 2.2.3
24
+ pillow 11.0.0
25
+ pip 23.2.1
26
+ protobuf 5.29.1
27
+ pyarrow 18.1.0
28
+ pydeck 0.9.1
29
+ Pygments 2.18.0
30
+ python-dateutil 2.9.0.post0
31
+ pytz 2024.2
32
+ referencing 0.35.1
33
+ requests 2.32.3
34
+ rich 13.9.4
35
+ rpds-py 0.22.3
36
+ scikit-learn 1.6.0
37
+ scipy 1.14.1
38
+ setuptools 65.5.0
39
+ six 1.17.0
40
+ smmap 5.0.1
41
+ streamlit 1.41.1
42
+ tenacity 9.0.0
43
+ threadpoolctl 3.5.0
44
+ toml 0.10.2
45
+ tornado 6.4.2
46
+ typing_extensions 4.12.2
47
+ tzdata 2024.2
48
+ urllib3 2.2.3
49
+ watchdog 6.0.0