Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,31 @@ You must have Scikit Learn, Pandas (for Machine Leraning Model) and Flask (for A

### Project Structure
This project has four major parts :
1. model.py - This contains code fot our Machine Learning model to predict employee salaries absed on trainign data in 'hiring.csv' file.
2. app.py - This contains Flask APIs that receives employee details through GUI or API calls, computes the precited value based on our model and returns it.
3. request.py - This uses requests module to call APIs already defined in app.py and dispalys the returned value.
1. model.py - This file contains the code for our Machine Learning model to predict employee salaries based on training data in 'hiring.csv' file.
2. app.py - This file contains Flask API that receives employee details through GUI or API calls, computes the precited value based on our model and returns it.
3. request.py - This file uses, requests module to call APIs already defined in app.py and dispalys the returned value.
4. templates - This folder contains the HTML template to allow user to enter employee detail and displays the predicted employee salary.
5. requirements.txt - This file contains, the list of all the liabraries with their respective versions, reuired to run the flask app successfully.

### Running the project
1. Ensure that you are in the project home directory. Create the machine learning model by running below command -
1. Ensure that you are in the project home directory.
Create virtual environment and run the following command to install all the required liabraries.
'''
pip install -r requirements.txt
'''
2. Create the machine learning model by running below command
```
python model.py
```
This would create a serialized version of our model into a file model.pkl

2. Run app.py using below command to start Flask API
3. Run app.py using below command to start Flask API
```
python app.py
```
By default, flask will run on port 5000.

3. Navigate to URL http://localhost:5000
4. Navigate to URL http://localhost:5000

You should be able to view the homepage as below :
![alt text](http://www.thepythonblog.com/wp-content/uploads/2019/02/Homepage.png)
Expand Down
286 changes: 286 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,286 @@
absl-py==0.11.0
alabaster==0.7.8
appdirs==1.4.4
apturl==0.5.2
argcomplete==1.12.2
argon2-cffi==20.1.0
asgiref==3.2.7
asn1crypto==0.24.0
astor==0.8.1
astroid==2.3.3
astunparse==1.6.3
async-generator==1.10
attrs==20.2.0
Automat==20.2.0
automium==0.2.6
automium-web==0.1.1
Babel==2.4.0
backcall==0.2.0
bcrypt==3.2.0
beautifulsoup4==4.6.0
black==20.8b1
bleach==3.2.1
Brlapi==0.6.6
cachetools==4.1.1
casymda==0.2.19
certifi==2020.6.20
cffi==1.14.4
chardet==3.0.4
click==7.1.2
click-plugins==1.1.1
cligj==0.7.1
cloudpickle==1.6.0
colorama==0.4.4
command-not-found==0.3
confuse==1.3.0
constantly==15.1.0
contextlib2==0.6.0.post1
coverage==5.3.1
cryptography==3.2.1
cssselect==1.1.0
cupshelpers==1.0
cycler==0.10.0
Cython==0.29.21
decorator==4.4.2
defer==1.0.6
defusedxml==0.6.0
descartes==1.1.0
distro-info===0.18ubuntu0.18.04.1
Django==3.0.6
dnspython==2.0.0
docopt==0.6.2
docutils==0.14
email-validator==1.1.2
entrypoints==0.3
feedparser==5.2.1
Fiona==1.8.18
Flask==1.1.2
Flask-Bcrypt==0.7.1
Flask-Cors==3.0.9
Flask-Login==0.5.0
Flask-MySQLdb==0.2.0
Flask-SQLAlchemy==2.4.4
Flask-WTF==0.14.3
future==0.18.2
gast==0.2.2
geopandas==0.8.1
gevent==20.9.0
gitsome==0.7.0
google-auth==1.23.0
google-auth-oauthlib==0.4.2
google-pasta==0.2.0
greenlet==0.4.17
grpcio==1.33.2
gym==0.18.0
h5py==2.10.0
html5lib==0.999999999
htmlmin==0.1.12
httplib2==0.9.2
hyperlink==20.0.1
idna==2.10
ImageHash==4.1.0
imagesize==0.7.1
importlib-metadata==2.0.0
incremental==17.5.0
ipykernel==5.3.4
ipython==7.18.1
ipython-genutils==0.2.0
ipywidgets==7.5.1
isort==4.3.21
itemadapter==0.2.0
itemloaders==1.0.4
itsdangerous==1.1.0
jedi==0.17.2
jeepney==0.4.3
Jinja2==2.11.2
jmespath==0.10.0
joblib==0.17.0
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client==6.1.7
jupyter-console==6.2.0
jupyter-core==4.6.3
jupyterlab-pygments==0.1.2
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
keyring==21.4.0
keyrings.alt==4.0.0
kiwisolver==1.2.0
labelImg==1.8.3
language-selector==0.1
launchpadlib==1.10.6
lazr.restfulclient==0.13.5
lazr.uri==1.0.3
lazy-object-proxy==1.4.3
legacy==0.1.6
llvmlite==0.34.0
louis==3.5.0
lxml==4.2.4
macaroonbakery==1.1.3
Mako==1.0.7
Markdown==3.3.3
MarkupSafe==1.1.1
matplotlib==3.3.3
mccabe==0.6.1
missingno==0.4.2
mistune==0.8.4
more-itertools==8.6.0
mpmath==1.1.0
munch==2.5.0
mypy-extensions==0.4.3
mysqlclient==2.0.2
nbclient==0.5.0
nbconvert==6.0.7
nbformat==5.0.7
nest-asyncio==1.4.1
netifaces==0.10.4
networkx==2.5
notebook==6.1.4
npm==0.1.1
numba==0.51.2
numpy==1.18.5
numpydoc==0.7.0
oauth==1.0.1
oauthlib==3.1.0
object-detection==0.1
olefile==0.45.1
opencv-python==4.4.0.44
opt-einsum==3.3.0
optional-django==0.1.0
osmnx==0.11.4
packaging==20.4
pandas==1.1.2
pandas-profiling==2.9.0
pandoc==1.0.2
pandocfilters==1.4.2
parsel==1.6.0
parso==0.7.1
pathspec==0.8.1
pexpect==4.8.0
pgi==0.0.11.2
phik==0.10.0
pickleshare==0.7.5
Pillow==7.2.0
pkginfo==1.5.0.1
plotly==4.12.0
pluggy==0.13.1
ply==3.11
prometheus-client==0.8.0
prompt-toolkit==3.0.7
Protego==0.1.16
protobuf==3.13.0
ptyprocess==0.6.0
py==1.10.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycairo==1.16.2
pycparser==2.20
pycrypto==2.6.1
pycups==1.9.73
PyDispatcher==2.0.5
pygame==2.0.0
pyglet==1.5.0
Pygments==2.7.1
pygobject==3.26.1
PyHamcrest==2.0.2
pylint==2.4.4
pymacaroons==0.13.0
PyNaCl==1.1.2
pyOpenSSL==20.0.0
pyparsing==2.4.7
pyproj==3.0.0.post1
PyQt5==5.10.1
PyQt5-sip==12.8.1
pyRFC3339==1.0
pyrsistent==0.17.3
pytest==5.4.1
pytest-cov==2.8.1
python-apt==1.6.5+ubuntu0.3
python-dateutil==2.8.1
python-debian==0.1.32
pytz==2018.3
PyWavelets==1.1.1
pyxattr==0.6.0
pyxdg==0.25
PyYAML==3.12
pyzmq==19.0.2
qtconsole==4.7.7
QtPy==1.9.0
queuelib==1.5.0
readme-renderer==27.0
regex==2020.11.13
reportlab==3.4.0
requests==2.24.0
requests-oauthlib==1.3.0
requests-toolbelt==0.9.1
requests-unixsocket==0.1.5
retriever @ git+https://[email protected]/weecology/retriever.git@020e8aca2bd0aed2dec1b918de98c9c26a623bc1
retrying==1.3.3
rfc3986==1.4.0
roman==2.0.0
rsa==4.6
Rtree==0.9.7
scikit-learn==0.23.2
scipy==1.5.4
Scrapy==2.4.1
seaborn==0.11.0
SecretStorage==3.1.2
Send2Trash==1.5.0
service-identity==18.1.0
setproctitle==1.1.10
Shapely==1.7.1
simplejson==3.13.2
simpy==4.0.1
sip==4.19.8
six==1.15.0
slim==0.1
Sphinx==1.6.7
SQLAlchemy==1.3.22
sqlparse==0.3.1
stable-baselines==2.10.1
sympy==1.7
system-service==0.3
systemd-python==234
tangled-up-in-unicode==0.0.6
tensorboard==1.15.0
tensorboard-plugin-wit==1.7.0
tensorflow==1.15.2
tensorflow-cpu==2.3.1
tensorflow-estimator==1.15.1
tensorflow-object-detection-api==0.1.1
termcolor==1.1.0
terminado==0.9.1
testpath==0.4.4
tf-slim==1.1.0
threadpoolctl==2.1.0
toml==0.10.2
tornado==6.0.4
tqdm==4.50.2
traitlets==5.0.4
twine==3.2.0
Twisted==20.3.0
typed-ast==1.4.1
typing-extensions==3.7.4.3
ubuntu-drivers-common==0.0.0
ufw==0.35
unattended-upgrades==0.1
urllib3==1.22
usb-creator==0.3.3
virtualenv==15.1.0
visions==0.5.0
w3lib==1.22.0
wadllib==1.3.2
wcwidth==0.1.7
webencodings==0.5.1
Werkzeug==1.0.1
widgetsnbextension==3.5.1
wrapt==1.11.2
WTForms==2.3.3
xkit==0.0.0
xlrd==1.2.0
xmltodict==0.12.0
xonsh==0.6.0
youtube-dl==2018.3.14
zipp==3.3.0
zope.event==4.5.0
zope.interface==4.3.2