Ijraset Journal For Research in Applied Science and Engineering Technology
Authors: Himangi Dani, Pooja Bhople, Hariom Waghmare, Kartik Munginwar, Prof. Ankush Patil
DOI Link: https://doi.org/10.22214/ijraset.2022.40222
Certificate: View Certificate
According to the current scenario, the use of machine learning is increasing in a variety of web applications and services. A good visual experience, fast performance, and easy to use framework is critical for developing and deploying your model. Working on a machine learning model is one thing but deploying a machine learning model to production can be another. Creating a Machine Learning model is one thing but deploying the model in real-time is the real challenge. For that purpose, many different technologies are available in the field. The simplest way to deploy a machine learning model is to create a web service or application. In this paper, we will discuss different frameworks for the deployment of the machine learning model on web applications or services. In this paper we will discuss Flask framework, Streamlit framework, Django Framework.
I. INTRODUCTION
When we are saying we're going to set up the version in manufacturing or production the model, we are regarding integrating the device studying version into current business software. In simple terms, we disclose the ML model as relaxation API endpoints to serve the requests within the application platform or to direct user requests. This model to be deployed in production is a whole predictor that provides some output supported the rule of thumb used for batch knowledge, or it is used or it may be used to serve requests in actual time, making it a dynamic model. The Python web framework is a collection of programs and modules that builders can use to create net applications and offerings. web generation allows two or greater humans to speak the usage of laptop language through establishing a connection over a network and using computer languages to speak. most people of internet frameworks are completely Server-side technology. among the extreme net Frameworks are those who use the net browser as a software execution environment. Frameworks offer help for some activities such as producing responses, storing information persistent and so forth. Integrating a machine learning model into an existing production environment where it can take in an input and return an output [1].
Machine learning models are powerful and most effective, but they are not very useful by themselves. And each model has its own merits. Once the Machine Learning model is complete, now it's time to be deployed in a real-life environment. Nowadays several tools can be used by Data scientists which can help them to easily deploy a machine learning model. There are huge data daily generated by different sources so working on that is one thing and deploying a machine learning model to the production part is another. Several things need to be kept in consideration while deployment such as its Cost, performance, complexity, etc.Deploying as well as building a model is an iterative process with some cycling parts that would need taken care of from the information of other steps to be improved.
II. APPROACHES
A. Flask Framework
Flask was created by Armin Ronacher of Pocoo, an international group of Python enthusiasts formed in 2004[7]. In April 2016, the Pocoo team was disbanded, and development of Flask and related libraries passed to the newly formed Pallets project [8],[9]. Flask is a python-based net utility framework. Use flask to enhance small websites. In easy language it enables quit users to interact along with your python code (in this situation our ML fashions) immediately from their internet browser without needing any library code documents, etc. Flask is very easy to carry out Restful API's using python. Flask permits you to create net applications very effortlessly, that is why it allows you to consciousness more on different crucial factors of the ML lifestyles cycle such as EDA, engineering issues, etc. It has many modules that make it smooth for an internet developer to write down programs without having to fear approximately details like protocol control, cable control, and so forth. Flask offers a spread of options for growing net programs and provides us with the essential equipment and libraries that permit us to build an internet utility.
RESTful request dispatching.
Makes use of a Jinja2 template engine.
Support for secure cookies (client-side periods).
Large documentation.
Google app engine compatibility [8].
APIs are nicely fashioned and coherent
Easily deployable in production
B. Streamlit Framework
Another Framework That we can use for the Machine learning model deployment is the Streamlit framework. It is also an open-source framework for building web apps for Data science and Ml. It will allow writing a code as good as writing a python code. Adrien Treuille, Thiago Teixeira, and Amanda Kelly created “Streamlit” [2]. Streamlit is user-friendly. It is the faster way to build data apps and share them according to the streamlit founders. If you are enthusiasts about machine learning and you do not want to waste your time building a web app for the Ml model deployment, then streamlit is important.it is built to interact with the data in the model.
It is open-source library
No front-end experience required
Create Front-end in python
No front-end knowledge required like java script
Effortlessly share, manage, collaborate on your apps directly from Streamlit [4].
Using simple code, we can create app for machine learning project.
Adding a widget easy as declaring variable
C. Django Framework
Machine-learning application demand is increasing day by day and growing. Django is a high-level Python Web Development framework that encourages rapid development and clean, pragmatic design [5]. It is the framework that is developed by a Professional/experienced developer. REST framework is a collaboratively funded project. Full MVF framework is provided by the Django Framework, it includes all the things. The most popular Framework in python is the Django framework. A non-profit organization in the United States, It is responsible for its maintenance. Django framework acts as the connector between Data based Engine and Data Model. In Django Framework, the standardized Way to provide data to Other Applications is REST API.
It is a Python Web Framework.
It is using as Search Engine Optimization
It provides High Scalability
It is in Versatile in Nature
It Offers High Security
It is Thoroughly Tested
It Provides Rapid Development
III. COMPARATIVE STUDY
Table I
Comparison Between FLask Framework, Streamlit Framework and Django Framework
Features |
Flask Framework |
Streamlit Framework |
Django Framework |
Open Source |
Yes |
Yes |
Yes |
Popular |
Yes |
Yes |
Yes |
Created in/Launch |
2010 |
2018 |
2005 |
Type of framework |
Full-stack web framework |
Lightweight framework |
Lightweight framework/ closed framework |
Simplicity |
Less compare to streamlit |
More compared to Flask and Django |
Less compare to streamlit |
Web application based on |
WSGI server |
Tornado server |
WSGI server |
Project layout (multiple page application) |
Yes |
Yes |
Yes |
Contain bootstrapping Tool(built -in) |
No |
Yes |
Yes |
Database support |
Used SQLAlchemy for database requirement |
MySQL |
MySQL, Oracle |
Flexibility |
More flexible than Django |
Flexible |
Less compare to flask |
Support dynamic HTML page |
No |
Yes |
Yes |
Features |
Less compare to Django |
Same as flask |
More compare to flask and streamlit |
Can create static component |
Yes |
Yes |
Yes |
Virtual Debugger support |
Built in debugger |
It has debugger support |
Do not support virtual debugger |
Restful API |
Flask-Marshmallow Flask-JWT Flask-RESTful |
Django Rest framework |
Python Api
|
Performance |
Slightly better than Django |
Same as Django |
Slightly less than Flask |
Convenient for project |
Smaller, medium, less complicated |
Smaller, medium |
Large, complicated |
Companies using framework |
Netflix Mailgun |
Hypatos LMS Isaac |
Udemy |
A. mAdvantages of Django
B. Disadvantages of Django
According to us, Django is a better framework for the deployment of the machine learning model in web applications. It is open source. As it was flexible, simple and easy to use. For the bigger machine learning web-based project, the Django framework is very suitable. It provides lots of features to the developer for building the web application. Flask framework and streamlit framework is suitable for smaller types of projects. Django provides more advanced features compared to the flask and streamlit framework. Django has better community support than the flask and streamlit. streamlit is of now is a closed framework.
[1] https://medium.com/@letthedataconfess/how-to-deploy-machine-learning-project-with-flask-20aa2c5775b. [2] https://www.geeksforgeeks.org/a-beginners-guide-to-streamlit/. [3] https://www.latentview.com/data-engineering-lp/introduction-to-streamlit/ [4] P. Singh, Deploy Machine Learning Models to Production. Apress, 2021 [5] https://medium.com/saarthi-ai/deploying-a-machine-learning-model-using-django-part-1-6c7de05c8d7 [6] https://hevodata.com/learn/django-rest-framework/ [7] \"Pocoo Team\". Archived from the original on 2018-03-15 [8] Ronacher, Armin (2016-04-01). \"Hello Pallets Users\". The Pallets Projects. Retrieved 2021-05-08. [9] \"Pocoo\". www.pocoo.org. Retrieved 2021-05-08 [10] https://en.wikipedia.org/wiki/Flask_(web_framework) [11] https://www.analyticsvidhya.com/blog/2021/06/build-web-app-instantly-for-machine-learning-using-streamlit/ [12] https://www.django-rest-framework.org/ [13] N. Idris, C. F. M. Foozy, and P. Shamala, “A generic review of web technology: Django and flask,” International Journal of Engineering Information Computing and Application, vol. 1, no. 1, 2019 [14] Ghimire, D. (2020). Comparative study on Python web frameworks: Flask and Django [15] https://www.interviewbit.com/blog/flask-vs-django/ [16] https://www.guru99.com/flask-vs-django.html0 [17] https://www.streamlit.io/. [18] https://www.analyticsvidhya.com/blog/2020/12/deploying-machine-learning-models-using-streamlit-an-introductory-guide-to-model-deployment/ [19] https://thecleverprogrammer.com/2021/03/18/how-to-deploy-machine-learning-models/
Copyright © 2022 Himangi Dani, Pooja Bhople, Hariom Waghmare, Kartik Munginwar, Prof. Ankush Patil. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Paper Id : IJRASET40222
Publish Date : 2022-02-04
ISSN : 2321-9653
Publisher Name : IJRASET
DOI Link : Click Here