Posts

Deploying ML model to flask with joblib

In this blog, we will know how to deploy a Machine Learning model on a Flask App. In this blog, I am going to deploy a Simple Spam Classification Model to flask App. If you have read before about deployment of the ML model you have heard of Pickle . This is most famous library for model deployment. But the question is, Is it most suitable in every case. The answer is no. When we made a model with the sckit-learn classifiers, then Pickle faces some issues. These issues are also described in docs. But the Solution is the  JOBLIB  library. In this blog We will create a flask app and deploy the model in flask App with help of joblib. from here you can download pre-trained model used in this blog. Models are in output file on kaggle-  https://www.kaggle.com/thedeathcure/sms-spam-filtering . Model files are present in both format - model.joblib(joblib) and model.pkl (pickle)   Create app.py   https://gist.github.com/maze-runnar/4b455b2b2bdb0ba45c744da55dce5160 import ...

15 Days of Python: Day-2

Image
Number and Strings In this blog I am going to discuss about Numbers and Strings. First jump to numbers.  NUMBERS: 1. Arithmetic Operations --   we can simply perform addition,multiplication, division and modulo operations on numbers. example:  > 1+2=3                  > 2*2 = 4                  > 5/2 = 2.5 (float division)                   > 5//2 = 2 (integer division)                  > 10%3 = 1(remainder) 2. Assignment Operation --  example: > width = 20                 > height = 30                 > area = width*height                 > print(area)  >> 600  So there are nothing ...

15 Days of python: Day-1

I am starting this new series of blog '15 Days of python'. This will be a quick series and will be based on my personal experience while working with python and faced difficulties. Let's start - Installation on window:  https://www.python.org/downloads/windows/  go to the link and download installer then set your path and you are good to go. Installation on Ubuntu :  If you are using Ubuntu 16.10 or newer, then you can easily install Python 3.6 with the following commands: $ sudo apt-get update $ sudo apt-get install python3.8 If you’re using another version of Ubuntu (e.g. the latest LTS release), we recommend using the  deadsnakes PPA  to install Python 3.8: $ sudo apt-get install software-properties-common $ sudo add-apt-repository ppa:deadsnakes/ppa $ sudo apt-get update $ sudo apt-get install python3.8 If you are using other Linux distribution, chances are you already have Python 3 pre-installed as well. If not, use your distributi...

Google Code-In mentorship experience :)

Image
Introduction: Hello, this is Sundaram Dubey 3rd B.Tech. HBTU student. In this blog spot, I am going to discuss my Code-In journey as a Mentor . Maybe it's not a journey :) Basic Information: So one who doesn't know what is Code-in, for them: Code-in is a nearly 7 weeks long program for preUniversity students to get involved in the open-source community and get to know about real-world application development. This program is not just about coding, this is about community bonding. This year(2019-20) GCI held on 2 December 2019 - 21 January. So one week is still remaining and students are working on their final evaluation and tasks. Every organization has some tasks that are previously created and students have to complete them.  Motivation: So I am going off-topic perhaps. I am writing this blog about my GCI experience but it's overwhelming me where to start! So I heard of GCI  from a senior of our college and he was also a mentor of GCI for Zulip in 2017,18. I ta...

Testing tools for React Apps

Image
In today's blog we will discuss some testing tools of react apps .In general we write code to work, but now a days only writing a code is not enough , it should be less complex and more accurate ,efficient too . 1. ESLINT :- There are so many formats in which java Scripts code is written now a days by different developer so before developing a project coding styles parameters are being set for the react apps .(here react app means , reactjs and react native) . example - function add(x, y){     return x+y ; } ES6 syntax - const add = (x, y) => {     return x+y } Both syntax are correct  but setting a parameter is vary important . That's what is done by eslint; It is also use for the testing of a function : example -  // App.js function add(x, y) {     return x+y; } 2. console.log testing :- test : console.warn(add(1,2) === 3 , "this is a error function"); console.warn(add(1,6) === 7 , "this is a error function"); con...