Text Classification
Transformers
PyTorch
ONNX
English
bert
text-generation
text-embeddings-inference
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("MattStammers/Covid19_Text_Model")
model = AutoModelForSequenceClassification.from_pretrained("MattStammers/Covid19_Text_Model")Quick Links
This is a basic inference BERT model which has been fine-tuned to discriminate between covid19 and non-covid-19 relevant texts.
Unlike past models I have created this one raw and uploaded it as a standalone git repo to experiment with upload options. Not as streamlined as using the Huggingface card generation system but definitely simpler to do.
This is also my first experiment with ONNX.
- The dataset came from Thiago Martins: https://github.com/thigm85
Training data can be obtained as follows:
import pandas as pd
training_data = pd.read_csv("https://thigm85.github.io/data/cord19/cord19-query-title-label.csv")
training_data.head()
Please do not use this for any clinical/applied purpose. It is a toy app only.
- Downloads last month
- 2
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="MattStammers/Covid19_Text_Model")