Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
{}
|
| 3 |
+
---
|
| 4 |
+
### Student Progress Tracking
|
| 5 |
+
|
| 6 |
+
**Description:** Classify student assessment results to monitor their progress and identify areas that require improvement.
|
| 7 |
+
|
| 8 |
+
## How to Use
|
| 9 |
+
Here is how to use this model to classify text into different categories:
|
| 10 |
+
|
| 11 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 12 |
+
|
| 13 |
+
model_name = "interneuronai/student_progress_tracking_bart"
|
| 14 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
| 15 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 16 |
+
|
| 17 |
+
def classify_text(text):
|
| 18 |
+
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True, max_length=512)
|
| 19 |
+
outputs = model(**inputs)
|
| 20 |
+
predictions = outputs.logits.argmax(-1)
|
| 21 |
+
return predictions.item()
|
| 22 |
+
|
| 23 |
+
text = "Your text here"
|
| 24 |
+
print("Category:", classify_text(text))
|