rlogh/superhero-texts
Viewer โข Updated โข 1.2k โข 9
How to use ysakhale/finetuning_notebook with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="ysakhale/finetuning_notebook") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("ysakhale/finetuning_notebook")
model = AutoModelForSequenceClassification.from_pretrained("ysakhale/finetuning_notebook", device_map="auto")# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("ysakhale/finetuning_notebook")
model = AutoModelForSequenceClassification.from_pretrained("ysakhale/finetuning_notebook", device_map="auto")The model occasionally misclassifies superheroes with ambiguous or overlapping traits (e.g., similarities between certain DC and Marvel characters).
This suggests the model may rely heavily on explicit universe keywords in the text.
Apache-2.0
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ysakhale/finetuning_notebook")