paramasivan27/Product_Category_Classification_BERT
Retail Product Classification Streamlit App
This Streamlit app is a product classification tool built using a BERT model fine-tuned on a retail product dataset. The model can classify products into one of 21 categories based on their title and description.
Dataset
The model was trained using the Kaggle Retail Product Classification dataset. The dataset consists of various product descriptions and their corresponding categories. The training goal was to classify products into 21 distinct categories.
Categories and Index Mapping
Model Training
The model used for this app is a BERT base model (bert-base-uncased) fine-tuned using the Hugging Face transformers library. The model was trained to classify products into the 21 categories listed above. The fine-tuning was carried out using the following training arguments:
'''python trainingargs = TrainingArguments( outputdir='./results', evaluationstrategy='epoch', savestrategy='epoch', loggingstrategy="steps", loggingsteps=10, perdevicetrainbatchsize=32, perdeviceevalbatchsize=16, numtrainepochs=6, weightdecay=0.01, learningrate=2e-5, lrschedulertype='cosine', warmupsteps=250, loggingdir='./logs', reportto="tensorboard", loadbestmodelatend=True, savetotallimit=3, gradientaccumulationsteps=2, seed=42, evalaccumulation_steps=10, )'''
How to run the APP
Provide any Retail product title and Description in the given text boxes and click on classify product. The app would return the appropriate category
