File size: 3,160 Bytes
e007be3
 
5af38e4
e007be3
 
 
 
 
c987989
 
 
e007be3
 
 
 
 
 
 
 
 
 
84308a8
87901b3
e007be3
e4270c1
3c299ad
e007be3
b3f9b4b
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# BART (large-sized model), fine-tuned on Amazon Reviews (English Language)

The BART model was pre-trained on the CNN-DailyMail dataset, but it was re-trained on the Amazon's Website Purchase that were provided in English Language. The purpose of doing this was to build a pipeline that is designed to summarize user reviews on Amazon.com.

## Model description

According to huggingface, BART is a transformer encoder-encoder (seq2seq) model with a bidirectional (BERT-like) encoder and an autoregressive (GPT-like) decoder. BART is pre-trained by (1) corrupting text with an arbitrary noising function, and (2) learning a model to reconstruct the original text.

## Datasets
Link: [Amazon Reviews Corpus](https://huggingface.co./datasets/amazon_reviews_multi)

## Intended uses & limitations

This model is intended to be used for summarizing user reviews on websites. 

### How to use

Here is how to use this model with the [pipeline API](https://huggingface.co./transformers/main_classes/pipelines.html):

```python
from transformers import pipeline
summarizer = pipeline("summarization", model="mabrouk/amazon-review-summarizer-bart")
review = """ I really like this book. It takes a step-by-step approach to introduce the reader to the IBM Q Experience, to the basics underlying quantum computing, and to the reality of the noise involved in the current machines. This introduction is technical and shows the user how to use the IBM system either directly through the GUI on their website or by running Python code on one's own machine. The text provides examples of small exercises to try and stimulates ideas of new things to try. The IBM Q Exp Qiskit software modules are identified and introduced - Terra, Aer, Ignis, and Aqua, as well as the backends that one can choose to do the computing. The book ends with two great chapters on quantum algorithms.
"""
print(summarizer(review, min_length = 60))
>>> [{'summary': 'This book is a great resource, and a great read, to learn about quantum and start writing your first programs, or to brush up on your programming skills. I loved that there is a quiz at the end of every chapter so you can check and see how...'}]
```

### Reference
Pre-traind Model: [facebook/bart-large-cnn](https://huggingface.co./facebook/bart-large-cnn?text=The+tower+is+324+metres+%281%2C063+ft%29+tall%2C+about+the+same+height+as+an+81-storey+building%2C+and+the+tallest+structure+in+Paris.+Its+base+is+square%2C+measuring+125+metres+%28410+ft%29+on+each+side.+During+its+construction%2C+the+Eiffel+Tower+surpassed+the+Washington+Monument+to+become+the+tallest+man-made+structure+in+the+world%2C+a+title+it+held+for+41+years+until+the+Chrysler+Building+in+New+York+City+was+finished+in+1930.+It+was+the+first+structure+to+reach+a+height+of+300+metres.+Due+to+the+addition+of+a+broadcasting+aerial+at+the+top+of+the+tower+in+1957%2C+it+is+now+taller+than+the+Chrysler+Building+by+5.2+metres+%2817+ft%29.+Excluding+transmitters%2C+the+Eiffel+Tower+is+the+second+tallest+free-standing+structure+in+France+after+the+Millau+Viaduct.)
Re-trained Dataset: [Amazon Reviews Corpus](https://huggingface.co./datasets/amazon_reviews_multi)