zeusfsx commited on
Commit
6f4cc65
·
1 Parent(s): 0a6e134

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +78 -1
README.md CHANGED
@@ -11,4 +11,81 @@ widget:
11
  example_title: "Приклад 1"
12
  - text: "Що таке дихання маткою? - розказує лікар гінеколог"
13
  example_title: "Приклад 2"
14
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  example_title: "Приклад 1"
12
  - text: "Що таке дихання маткою? - розказує лікар гінеколог"
13
  example_title: "Приклад 2"
14
+ ---
15
+
16
+ # Instruction Detection Model
17
+
18
+ Welcome to the repository for the instruction detection model! This model, hosted on the [Hugging Face Model Hub](https://huggingface.co/models), is designed specifically for detecting instructions in newspaper titles. Utilizing token classification, it scans through the given input - a newspaper title, and labels tokens that appear to signify an instruction.
19
+
20
+ Model Card: [zeusfsx/instruction-detection](https://huggingface.co/zeusfsx/instruction-detection)
21
+
22
+ ## Table of Contents
23
+
24
+ - [Introduction](#introduction)
25
+ - [Usage](#usage)
26
+ - [Training](#training)
27
+ - [Evaluation](#evaluation)
28
+ - [License](#license)
29
+ - [Citation](#citation)
30
+ - [Contact Information](#contact-information)
31
+
32
+ ## Introduction
33
+
34
+ In the age of information, newspaper titles are often crafted to attract attention and occasionally incorporate direct or indirect instructions. This model can help analyze these titles, detect such instructions, and tag them accordingly.
35
+
36
+ It employs token classification task, a common technique in Natural Language Processing (NLP), to detect and label instructions in the text.
37
+
38
+ ## Usage
39
+
40
+ Here's how to use this model:
41
+
42
+ ### In Python
43
+
44
+ ```python
45
+ from transformers import AutoTokenizer, AutoModelForTokenClassification
46
+ from transformers import pipeline
47
+
48
+ tokenizer = AutoTokenizer.from_pretrained("zeusfsx/instruction-detection")
49
+ model = AutoModelForTokenClassification.from_pretrained("zeusfsx/instruction-detection")
50
+
51
+ nlp = pipeline("ner", model=model, tokenizer=tokenizer)
52
+ example = "Your example newspaper title here"
53
+
54
+ output = nlp(example)
55
+ print(output)
56
+ ```
57
+
58
+ This will return a list of recognized tokens marked with label 'INSTRUCTION'.
59
+
60
+ ## Training
61
+
62
+ The model was trained on a large dataset of newspaper titles (~3k titles), with tokens representing instructions manually labeled.
63
+
64
+ ## Evaluation
65
+
66
+ Model performance was evaluated using a held-out test set, again consisting of manually labeled newspaper titles. F1 - 0.8213 for the 'INSTRUCTION' label
67
+
68
+ ## License
69
+
70
+ This project is licensed under the terms of the MIT license.
71
+
72
+ ## Citation
73
+
74
+ If you use our model or this repository in your research, please cite it as follows:
75
+
76
+ ```
77
+ @misc{instruction-detection,
78
+ author = {Oleksandr Korovii},
79
+ title = {Instruction Detection Model},
80
+ year = {2023},
81
+ publisher = {HuggingFace Model Hub},
82
+ url = {https://huggingface.co/zeusfsx/instruction-detection},
83
+ note = {Accessed: 2023-06-20}
84
+ }
85
+
86
+ ```
87
+
88
+ ## Contact Information
89
+
90
+ For any questions or suggestions, feel free to open an issue in this repository.
91
+ Contributions to improve this model or the associated documentation are welcome!