dmariko commited on
Commit
1e6fee3
·
1 Parent(s): 2884780

feat(clean)

Browse files
Files changed (1) hide show
  1. Readme.md +0 -69
Readme.md DELETED
@@ -1,69 +0,0 @@
1
-
2
-
3
- # T5-base data to text model specialized for Finance NLG
4
-
5
- __simple version__
6
-
7
- ----
8
- ## Usage (HuggingFace Transformers)
9
-
10
-
11
-
12
- #### Call the model
13
-
14
- ```python
15
- from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
16
-
17
- tokenizer = AutoTokenizer.from_pretrained("yseop/FNP_T5_D2T_complete")
18
-
19
- model = AutoModelForSeq2SeqLM.from_pretrained("yseop/FNP_T5_D2T_complete")
20
-
21
-
22
- text = ["Group profit | valIs | € 115.7 million && € 115.7 million | dTime | in 2019"]
23
-
24
- ```
25
- #### Choose a generation method
26
-
27
- ```python
28
-
29
-
30
- input_ids = tokenizer.encode(": {}".format(text), return_tensors="pt")
31
- p=0.72
32
- k=40
33
-
34
- outputs = model.generate(input_ids,
35
- do_sample=True,
36
- top_p=p,
37
- top_k=k,
38
- early_stopping=True)
39
-
40
- print(tokenizer.decode(outputs[0]))
41
-
42
- ```
43
-
44
-
45
-
46
- ```python
47
-
48
- input_ids = tokenizer.encode(": {}".format(text), return_tensors="pt")
49
-
50
- outputs = model.generate(input_ids,
51
- max_length=200,
52
- num_beams=2, repetition_penalty=2.5,
53
- top_k=50, top_p=0.98,
54
- length_penalty=1.0,
55
- early_stopping=True)
56
-
57
- print(tokenizer.decode(outputs[0]))
58
-
59
-
60
- ```
61
-
62
-
63
- ```bibtex
64
- @inproceedings{Mariko-fincausal-2021, title ={{The Financial Document Causality Detection Shared Task (FinCausal 2021)}}, author = {Mariko, Dominique and Abi Akl, Hanna and Labidurie, Estelle and de Mazancourt, Hugues and El-Haj, Mahmoud}, booktitle ={{The Third Financial Narrative Processing Workshop (FNP 2021)}}, year = {2021}, address = {Lancaster, UK} }
65
-
66
- ```
67
-
68
-
69
- **Created by:** [Yseop](https://www.yseop.com/) | Pioneer in Natural Language Generation (NLG) technology. Scaling human expertise through Natural Language Generation.