Commit
·
257fc96
1
Parent(s):
3725cce
Update README.md
Browse files
README.md
CHANGED
|
@@ -30,9 +30,11 @@ Goal: a model that can be used for a general-purpose summarizer for academic and
|
|
| 30 |
---
|
| 31 |
|
| 32 |
## Usage
|
| 33 |
-
|
| 34 |
-
|
| 35 |
```
|
|
|
|
|
|
|
| 36 |
prompts = {
|
| 37 |
"article": "Produce an article summary of the following news article:",
|
| 38 |
"one_sentence": "Given the following news article, summarize the article in one sentence:",
|
|
@@ -44,6 +46,7 @@ prompts = {
|
|
| 44 |
```
|
| 45 |
After `pip install transformers` run the following code:
|
| 46 |
|
|
|
|
| 47 |
```python
|
| 48 |
from transformers import pipeline
|
| 49 |
|
|
|
|
| 30 |
---
|
| 31 |
|
| 32 |
## Usage
|
| 33 |
+
Check the colab notebook for desired usage
|
| 34 |
+
**The model expects a prompt prepended to the source document to indicate the type of summary**, examples of prompts used to train the model here:
|
| 35 |
```
|
| 36 |
+
|
| 37 |
+
.
|
| 38 |
prompts = {
|
| 39 |
"article": "Produce an article summary of the following news article:",
|
| 40 |
"one_sentence": "Given the following news article, summarize the article in one sentence:",
|
|
|
|
| 46 |
```
|
| 47 |
After `pip install transformers` run the following code:
|
| 48 |
|
| 49 |
+
This pipeline will run slower and not have some of the tokenization parameters as the colab.
|
| 50 |
```python
|
| 51 |
from transformers import pipeline
|
| 52 |
|