MatteoCargnelutti commited on
Commit
1f3275c
·
verified ·
1 Parent(s): c034ea9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +23 -5
README.md CHANGED
@@ -11,7 +11,7 @@ license: apache-2.0
11
 
12
  # 📚 Institutional Books Topic Classifier
13
 
14
- This model was trained as part of the analysis and experiments performed in preparation of the release of the [Institutional Books 1.0 dataset](https://huggingface.co/collections/instdin/institutional-books-68366258bfb38364238477cf).
15
 
16
  We used this text classifier to assign 1 of 20 topics, derived from the first level of the [Library of Congress' Classification Outline](https://www.loc.gov/catdir/cpso/lcco/), to individual volumes.
17
 
@@ -23,11 +23,11 @@ Complete experimental setup and results are available in our [technical report](
23
  ## Input format
24
  Book metadata, formated as follows:
25
  ```
26
- Title: Full title of the book
27
- Author: Lorem Ipsum
28
- Year: 1852
29
  Language: English
30
- General Note: A great book
31
  ```
32
 
33
  All of the fields listed in this example are optional.
@@ -76,6 +76,24 @@ All of the fields listed in this example are optional.
76
 
77
  Post-training benchmark accuracy: 97.8% (978/1000)
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  ## Cite
80
  ```
81
  TBD
 
11
 
12
  # 📚 Institutional Books Topic Classifier
13
 
14
+ This model was trained as part of the analysis and refinements performed in preparation of the release of the [Institutional Books 1.0 dataset](https://huggingface.co/collections/instdin/institutional-books-68366258bfb38364238477cf).
15
 
16
  We used this text classifier to assign 1 of 20 topics, derived from the first level of the [Library of Congress' Classification Outline](https://www.loc.gov/catdir/cpso/lcco/), to individual volumes.
17
 
 
23
  ## Input format
24
  Book metadata, formated as follows:
25
  ```
26
+ Title: A treatise on analytical geometry of tree dimensions, containing the theory of curve surfaces and of curves of double curvature.
27
+ Author: Hymers, J.
28
+ Year: 1848
29
  Language: English
30
+ General Note: Example of a general note
31
  ```
32
 
33
  All of the fields listed in this example are optional.
 
76
 
77
  Post-training benchmark accuracy: 97.8% (978/1000)
78
 
79
+ ## Quickstart
80
+
81
+ ```python
82
+ from transformers import pipeline
83
+
84
+ to_label = """
85
+ Title: A treatise on analytical geometry of tree dimensions, containing the theory of curve surfaces and of curves of double curvature.
86
+ Author: Hymers, J.
87
+ Year: 1848
88
+ Language: English
89
+ General Note: Example of a general note
90
+ """
91
+
92
+ pipe = pipeline("text-classification", model="instdin/institutional-books-topic-classifier-bert")
93
+ result = pile(to_label.strip())
94
+ print(result[0]) # {'label': 'SCIENCE', 'score': 0.9996894598007202}
95
+ ```
96
+
97
  ## Cite
98
  ```
99
  TBD