atulgaikwad12 / BERT_ktrain_demo

Simple NLP text classification project to demonstrate BERT ktrain application using 20 newsgroup dataset

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BERT-k-train-usecase

Text Classification use case using BERT base architecture and fine tunning the model with the help of ktrain. Dataset used - 20newsgroups dataset.

Project Execution steps

Clone repository in local

git clone <repository_url>

Execute below commands in git bash. (Note - Must have conda installed and path defined of conda in system environments)

Step 1 : Activate base conda Enviroment

If using git bash then use below command

source activate base

Else for cmd use

conda activate base
Step 2 : Create new Conda Enviroment & Activate it

To Create Conda Enviroment and activate it

conda create -n <envName> python=3.7 -y
conda env list
activate <envName>

Conda command to create virtual env inside current directly

conda create --prefix ./env python=3.7 -y && conda activate ./env
Step 3 : Install required packages and List down libraries
pip install -r requirements.txt
conda list
Step 4 : To save your version of code. Create new git repository & then execute below commands only once to push change first time.
git add .
git status
git commit -m "commit message"
git remote add origin 'your_repository_url'
git branch -m master main
git push -u origin main
After first commit for subsequent changes just execute below commands
git add .
git commit -m "commit message"
git push

To freeze new requirements.txt File

pip freeze>requirements.txt

About

Simple NLP text classification project to demonstrate BERT ktrain application using 20 newsgroup dataset

License:MIT License


Languages

Language:Python 56.1%Language:Shell 43.9%