Downloads · 30 days
4
4% of all-time downloads
mjpsm/Griot-Story-Identifier-1k-v1
Griot-Story-Identifier-1k-v1 is a text classification model from mjpsm. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
This is a fine-tuned binary text classification model that predicts whether a given passage contains a story (story) or does not (notstory). It was trained on a synthetic dataset of 1,000 rows, with each input text be…
Downloads · 30 days
4
4% of all-time downloads
All-time downloads
90
Public
Parameters
67M
268 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
This is a fine-tuned binary text classification model that predicts whether a given passage contains a story (story) or does not (not_story).
It was trained on a synthetic dataset of 1,000 rows, with each input text being ≥ 300 words.
distilbert-base-uncasedstory vs. not_story)story → text contains a narrative arc (beginning, middle, end, events, characters)not_story → text is descriptive, conversational, or factual without a narrative arcLoad the model directly from the Hub:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
repo_id = "mjpsm/Griot-Story-Identifier-1k-v1"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForSequenceClassification.from_pretrained(repo_id)
text = """
Last summer, my friends and I built a treehouse in the backyard...
(300+ word passage here)
"""
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256)
with torch.no_grad():
logits = model(**inputs).logits
pred_id = int(logits.argmax(dim=-1))
label = model.config.id2label[pred_id]
print("Predicted label:", label)