Files changed (1) hide show
  1. README.md +82 -0
README.md ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - de
4
+ base_model:
5
+ - agne/jobGBERT
6
+ pipeline_tag: text-classification
7
+ ---
8
+ # CareerBERT Classifier
9
+
10
+ A text classification model fine-tuned for career-related text analysis.
11
+
12
+ ## Installation
13
+
14
+ Install the required dependencies:
15
+
16
+ ```bash
17
+ pip install transformers torch
18
+ ```
19
+
20
+ ## Quick Start
21
+
22
+ Load and use the model in a few lines:
23
+
24
+ ```python
25
+ from transformers import AutoModelForSequenceClassification, AutoTokenizer
26
+ from transformers import pipeline
27
+
28
+ modelpath = "lwolfrum2/careerbert-classifier"
29
+ model = AutoModelForSequenceClassification.from_pretrained(modelpath)
30
+ tokenizer = AutoTokenizer.from_pretrained(modelpath)
31
+ pipe = pipeline("text-classification", model, tokenizer=tokenizer)
32
+
33
+ # Classify text
34
+ result = pipe("Your text here")
35
+ print(result)
36
+ ```
37
+
38
+ ## Usage
39
+
40
+ ### Simple Classification
41
+
42
+ ```python
43
+ # Single example
44
+ text = "I am looking for a job in software development."
45
+ result = pipe(text)
46
+ print(result)
47
+ # Output: [{'label': 'career_query', 'score': 0.98}]
48
+ ```
49
+
50
+ ### Batch Processing
51
+
52
+ ```python
53
+ texts = [
54
+ "Software engineer with 5 years experience",
55
+ "Just looking for a new job",
56
+ "Tell me about this coffee",
57
+ ]
58
+
59
+ results = pipe(texts)
60
+ for text, result in zip(texts, results):
61
+ print(f"{text} → {result['label']} ({result['score']:.2f})")
62
+ ```
63
+
64
+ ## Output Format
65
+
66
+ Each prediction returns a dictionary with:
67
+ - `label`: The predicted class (0 = not relevant, 1 = relevant)
68
+ - `score`: Confidence score (0–1)
69
+
70
+ ## Notes
71
+
72
+ - The model runs on CPU by default. For faster inference on large batches, use GPU:
73
+ ```python
74
+ pipe = pipeline("text-classification", model, tokenizer=tokenizer, device=0)
75
+ ```
76
+ - Texts longer than the model's max token length will be truncated.
77
+
78
+ ## Model Details
79
+
80
+ **Model**: lwolfrum2/careerbert-classifier
81
+ **Base**: BERT
82
+ **Task**: Text classification