RajSang commited on
Commit
8ad0e5e
1 Parent(s): 348736b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +63 -10
README.md CHANGED
@@ -1,9 +1,25 @@
1
  ---
 
2
  tags:
3
  - generated_from_trainer
4
  model-index:
5
  - name: pegasus-sports-titles
6
- results: []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  ---
8
 
9
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
@@ -11,21 +27,52 @@ should probably proofread and complete it, then remove this comment. -->
11
 
12
  # pegasus-sports-titles
13
 
14
- This model is a fine-tuned version of [AryanLala/autonlp-Scientific_Title_Generator-34558227](https://huggingface.co/AryanLala/autonlp-Scientific_Title_Generator-34558227) on an unknown dataset.
15
 
16
  ## Model description
17
 
18
- More information needed
19
-
20
- ## Intended uses & limitations
21
-
22
- More information needed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
- ## Training and evaluation data
 
25
 
26
- More information needed
27
 
28
- ## Training procedure
29
 
30
  ### Training hyperparameters
31
 
@@ -43,7 +90,13 @@ The following hyperparameters were used during training:
43
 
44
  ### Training results
45
 
 
 
 
 
 
46
 
 
47
 
48
  ### Framework versions
49
 
 
1
  ---
2
+
3
  tags:
4
  - generated_from_trainer
5
  model-index:
6
  - name: pegasus-sports-titles
7
+ widget:
8
+ - text: "Coutinho was just about to be introduced by Villa boss Gerrard midway through the second half when Bruno Fernandes slammed home
9
+ his second goal of the game off the underside of the bar. But the Brazilian proved the catalyst for a memorable response.
10
+ First he drove at the United defence, helping to create the space which Jacob Ramsey exploited to halve the deficit. Then Ramsey slid over an excellent
11
+ cross from the left which Raphael Varane was unable to intercept as he slid back, leaving Coutinho to finish into an empty net.
12
+ The goal brought celebrations at both ends of the pitch as Emiliano Martinez also went into the crowd in relief - it was the Argentine's horrible sixth-minute error that had gifted Fernandes the visitors' opener.
13
+ Given his background - with Liverpool, Barcelona and Bayern Munich - Coutinho is a bold loan signing by Villa, and underlines the pedigree of the man they appointed as manager in November.
14
+ Gerrard is not at Villa to learn how to avoid relegation.
15
+ His demands remain as high as they were as a player and Coutinho's arrival is an example of that.
16
+ Villa are a better team since Gerrard's arrival and, after a sluggish start against opponents they dominated but lost to in the FA Cup five days ago, they grew into the game.
17
+ The club's other newboy, Lucas Digne, was among those denied by United keeper David de Gea at the end of the first half - in unorthodox fashion, with his knees.
18
+ Ollie Watkins did not really test the Spain keeper when Villa broke after Edinson Cavani lost possession in his own half. However, Emi Buendia certainly did with a near-post header. Rooted to his line, De Gea's reactions were up to the job as he beat Buendia's effort away.
19
+ When De Gea produced more saves after half-time to deny Ramsey and Digne again, it appeared the image of the night for Villa would be midfielder Morgan Sanson kicking a drinks bottle in fury after his error in gifting Fred possession to set up Fernandes for the visitors' second had been followed immediately by his substitution.
20
+ However, as it was the prelude to Coutinho's arrival, it was the moment that changed the course of the game - and the acclaim for the Brazilian at the final whistle indicated Villa's fans are already firmly behind him."
21
+ language: en
22
+
23
  ---
24
 
25
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
 
27
 
28
  # pegasus-sports-titles
29
 
30
+ This model is a fine-tuned version of [AryanLala/autonlp-Scientific_Title_Generator-34558227](https://huggingface.co/AryanLala/autonlp-Scientific_Title_Generator-34558227) on some **sports news articles scraped from the internet. (For educational purposes only)**. The model can generate titles for sports articles. Try it out using the inference API.
31
 
32
  ## Model description
33
 
34
+ A Pegasus model tuned on generating scientific titles has been further fine-tuned to generate titles for sports articles. While training articles on **Tennis, Football (Soccer), Cricket , Athletics and Rugby** were used to generate titles. I experimented training the Tokenizer from scratch but it did not give good results compared to the pre-trained tokenizer.
35
+
36
+ ## Usage
37
+
38
+ ```python
39
+ from transformers import pipeline
40
+ #Feel free to play around with the generation parameters.
41
+ #Reduce the beam width for faster inference
42
+ #Note that the maximum length for the generated titles is 64
43
+ gen_kwargs = {"length_penalty": 0.8, "num_beams":8, "max_length": 48}
44
+ pipe = pipeline("summarization", model="RajSang/pegasus-sports-titles")
45
+
46
+ #Change the article according to your wish
47
+ article="""
48
+ Coutinho was just about to be introduced by Villa boss Gerrard midway through the second half when Bruno Fernandes slammed home
49
+ his second goal of the game off the underside of the bar. But the Brazilian proved the catalyst for a memorable response.
50
+ First he drove at the United defence, helping to create the space which Jacob Ramsey exploited to halve the deficit. Then Ramsey slid over an excellent
51
+ cross from the left which Raphael Varane was unable to intercept as he slid back, leaving Coutinho to finish into an empty net.
52
+ The goal brought celebrations at both ends of the pitch as Emiliano Martinez also went into the crowd in relief - it was the Argentine's horrible sixth-minute error that had gifted Fernandes the visitors' opener.
53
+ Given his background - with Liverpool, Barcelona and Bayern Munich - Coutinho is a bold loan signing by Villa, and underlines the pedigree of the man they appointed as manager in November.
54
+ Gerrard is not at Villa to learn how to avoid relegation.
55
+ His demands remain as high as they were as a player and Coutinho's arrival is an example of that.
56
+ Villa are a better team since Gerrard's arrival and, after a sluggish start against opponents they dominated but lost to in the FA Cup five days ago, they grew into the game.
57
+ The club's other newboy, Lucas Digne, was among those denied by United keeper David de Gea at the end of the first half - in unorthodox fashion, with his knees.
58
+ Ollie Watkins did not really test the Spain keeper when Villa broke after Edinson Cavani lost possession in his own half. However, Emi Buendia certainly did with a near-post header. Rooted to his line, De Gea's reactions were up to the job as he beat Buendia's effort away.
59
+ When De Gea produced more saves after half-time to deny Ramsey and Digne again, it appeared the image of the night for Villa would be midfielder Morgan Sanson kicking a drinks bottle in fury after his error in gifting Fred possession to set up Fernandes for the visitors' second had been followed immediately by his substitution.
60
+ However, as it was the prelude to Coutinho's arrival, it was the moment that changed the course of the game - and the acclaim for the Brazilian at the final whistle indicated Villa's fans are already firmly behind him.
61
+ """
62
+
63
+ result=pipe(article, **gen_kwargs)[0]["summary_text"]
64
+
65
+ print(result)
66
+
67
+ ```
68
+ **Output: Steven Gerrard's first game in charge of Aston Villa ended in a remarkable comeback against Manchester United.**
69
 
70
+ ## Training procedure
71
+ While training, **short titles were combined with the subtitles for the articles to improve the quality of the generated titles and the subtitles were removed from the main body of the articles.**
72
 
73
+ ##Limitations
74
 
75
+ In rare cases, if the opening few lines of a passage/article are descriptive enough, the model often just copies these lines instead of looking for information further down the articles, which may not be conducive in some cases.
76
 
77
  ### Training hyperparameters
78
 
 
90
 
91
  ### Training results
92
 
93
+ **Rouge1:0.382315**
94
+
95
+ **Rouge2: 0.186598**
96
+
97
+ **RougueL: 0.317393**
98
 
99
+ **RougeLsum: 0.317086**
100
 
101
  ### Framework versions
102