malvika2003's picture
Upload folder using huggingface_hub
db5855f verified

A newer version of the Gradio SDK is available: 5.7.1

Upgrade

Sequence Classification with OpenVINO

Sequence Classification (or Text Classification) is the NLP task of predicting a label for a sequence of words.

Binder Colab

Sentiment analysis is a sub-task of Sequence Classification. It is the use of natural language processing, text analysis, computational linguistics, and biometrics to systematically identify, extract, quantify, and study affective states and subjective information. This notebook performs sentiment analysis using OpenVINO. We will use the transformer-based DistilBERT base uncased finetuned SST-2 model from Hugging Face converting to OpenVINO IR format using OpenVINO PyTorch Frontend and model conversion Python API. We can also replace the model with the other BERT-based models for sequence classification. The model predicts one of two classes: Positive or Negative, after analyzing the sentiment of any given text. The notebook also estimates time required for inference.

image

Notebook Contents

This notebook performs sequence classification, using OpenVINO with the transformer-based DistilBERT base uncased finetuned SST-2 model from Hugging Face.

Installation Instructions

This is a self-contained example that relies solely on its own code.
We recommend running the notebook in a virtual environment. You only need a Jupyter server to start. For details, please refer to Installation Guide.