--- license: apache-2.0 tags: - text-classification - generic library_name: generic --- ## Hugging Face Transformers with Scikit-learn Classifiers 🤩🌟 This repository contains a small proof-of-concept pipeline that leverages longformer embeddings with scikit-learn Logistic Regression that does sentiment analysis. The training leverages the language module of [whatlies](https://github.com/koaning/whatlies). # Classification Report Below is the classification report 👇🏻 precision recall f1-score support 0 0.84 0.89 0.86 53 1 0.86 0.81 0.84 47 accuracy 0.85 100 macro avg 0.85 0.85 0.85 100 weighted avg 0.85 0.85 0.85 100 # Pipeline Below you can see the pipeline 👇🏻 (it's interactive! 🪄)
Pipeline(steps=[('embedding',\n HFTransformersLanguage(model_name_or_path='allenai/longformer-base-4096')),\n ('model', LogisticRegression())])Please rerun this cell to show the HTML repr or trust the notebook.
Pipeline(steps=[('embedding',\n HFTransformersLanguage(model_name_or_path='allenai/longformer-base-4096')),\n ('model', LogisticRegression())])
HFTransformersLanguage(model_name_or_path='allenai/longformer-base-4096')
LogisticRegression()