Skip to main content

Posts

Showing posts from April, 2020

Know the rasa ecosystem and train your model effectively

Hope you have read the previous blog to create chatbot using Rasa. I would recommend to read it before starting this blog. This blog will help you understand insights of rasa ecosystem and explain how to train your model effectively. Rasa is an open source framework for creating chatbot with natural language undertsanding. There are few important files of rasa project - ✪ domain.yml This file contain information about intent and respective actions . For instance- basis on intent of a user, appropriate action gets triggered and response is sent back to user. '-utter' is plain text without any logic behind it, however we can create custom action which we will discuss further in the blog. intents : - greet - goodbye - affirm actions : - utter_greet - utter_cheer_up - utter_did_that_help responses : utter_greet : - text : Hey! How are you? utter_cheer_up : - text : 'Great, carry on!' utter_did_that_help : - text : Did that help yo

Create chatbot in 20 minutes using RASA

This blog will help you create a working chatbot with in 20 minutes. For creating chatbot we need following libraries to be installed- >> Python3 >> Pip3 >> Rasa Lets start installing all libraries & dependencies which are need for creating chatbot. Note: I have used MAC, therefore sharing commands related to it. You can install it on Windows, Linux or any other operating system using respective commands. 1. Install Python3 > brew install python3 > python --version #make sure you have python3 installed 2. Install Pip3 > curl -O https://bootstrap.pypa.io/get-pip.py > sudo python3 get-pip.py If you get issue related to Frameoworks while installing pip, follow below steps -  > cd /usr/local/lib > mkdir Frameworks > sudo chown -R $(whoami) $(brew --prefix)/* Once installed check pip3 version > pip3 --version After python3 and pip3 is succeffully installed, proceed to next steps. 3. Install Rasa > pip

Git merge from one repo to another repo

This blog is for those who are looking for merging code from one repo to another repo. Why I will merge code from one repo to another? I forked from one git repo( may be some public git repo ) and did some cutomization on existing code. Occasionaly, features are being introduced in main git branch and I would like to get all those features in my own git repo. In this scenario, I would like to merge latest changes in my git repo. Here are few simple steps which will merge code from one git repo to another- 1. Clone the repo1(source git repo) > git clone https://github.com/org/repo1.git   > git pull 2. Clone the repo2(destination git repo) > git clone https://github.com/org/repo2.git > git pull 3. Goto repo2 (destination git folder) and checkout your prefered branch > cd repo2 > git checkout master>  4. Use below command to see the remote branch associated with your destination git repo > git remote -v  origin https://github.com/org/repo2.g

Python, Flask, Concurrency and Windows

This blog is for those who have written a program in Python and exposed it as API using Flask. You might have written the python algorithm and will be happy to see the output. With small usage and limited users, it still works by making some configuration changes. Problem arises when you host the same API in Production where multiple users are browsing it. Why it does not work in Production as local environment? In production, mutiple requests come to server from mutiple locations. If setup is not tuned to cater to concurrent users, either these requests will make the API down or will be throwing exception like 'Internal server error'. How can we configure the setup to serve concurrent users? There are few configuration which you have to keep in mind while designing the eco system to accomodate mutiple users. Make sure Python is installed on server.  Download Download pip from get-pip.py and run command python get-pip.py Install Flask using pip commands pip ins