omidvaramin
commited on
Commit
•
4c514b5
1
Parent(s):
676d729
Update README.md
Browse files
README.md
CHANGED
@@ -16,37 +16,53 @@ You can use this model for headline generation task on English news articles.
|
|
16 |
|
17 |
### Usage
|
18 |
```python
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
import transformers
|
46 |
import os
|
47 |
import torch
|
48 |
os.environ["CUDA_VISIBLE_DEVICES"]="5"
|
49 |
-
from transformers import
|
50 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
51 |
print(device)
|
52 |
|
|
|
16 |
|
17 |
### Usage
|
18 |
```python
|
19 |
+
article = """Two of the OPEC oil cartels 11 members, Nigeria and Venezuela, said today \
|
20 |
+
that they would voluntarily cut production in response to declining crude oil prices, which \
|
21 |
+
have fallen 20 percent from their peak two months ago.
|
22 |
+
The move, which would take less than 200,000 barrels of oil a day off the market, follows days \
|
23 |
+
of mixed signals from some OPEC officials, who have voiced increasing concern about the rapid \
|
24 |
+
drop in prices. Nigerias oil minister, Edmund Daukoru, who is president of OPEC this year, \
|
25 |
+
recently said the price of oil was very low.
|
26 |
+
Nigeria and Venezuela, which have generally been price hawks within the group, said their decision \
|
27 |
+
to cut production grew out of an informal deal reached at OPECs last meeting, earlier this month, \
|
28 |
+
to pare output if prices fell steeply. Some OPEC representatives have grown anxious at the slide in \
|
29 |
+
the oil futures markets, where prices for benchmark contracts have fallen from a midsummer high of \
|
30 |
+
$77.03 a barrel.
|
31 |
+
But traders shrugged off the announcement of the production cuts today. On the New York Mercantile \
|
32 |
+
Exchange, the most widely watched contract price light, low-sulfur crude for delivery next month \
|
33 |
+
traded this afternoon at $62.30 a barrel, down 0.7 percent.
|
34 |
+
Mr. Daukoru has been in contact with other OPEC ministers to discuss prices, which on Monday briefly \
|
35 |
+
slipped below $60 a barrel for the first time in six months. But the Organization of the Petroleum \
|
36 |
+
Exporting Countries, as the cartel is formally known, denied any shift in policy.
|
37 |
+
We are not currently concerned, a delegate from one of OPECs Gulf members said. The prices are \
|
38 |
+
currently manageable and fair. We are not overly alarmed by the prices. It is not a cause for alarm. \
|
39 |
+
It's the market working.
|
40 |
+
It is not unusual for oil prices to fall after Labor Day and the conclusion of the summer travel season. \
|
41 |
+
Demand tends to slow in the third quarter, and refiners reduce their output for seasonal maintenance; \
|
42 |
+
consumption picks up again with the first winter cold in the Western Hemisphere, and prices sometimes do as well.
|
43 |
+
We are not going to push extra oil in the market or force it down our customers throats, we just respond to demand, \
|
44 |
+
the delegate from the Gulf said.
|
45 |
+
Still, contradictory statements from senior OPEC representatives have sown doubt about the oil cartel's strategy. \
|
46 |
+
Whether OPEC countries actually reduce their output or not, the mixed messages have at least succeeded in one way: \
|
47 |
+
oil traders have been persuaded that OPEC is willing to step in to defend prices, and have traded on that belief, \
|
48 |
+
slowing the recent price decline.
|
49 |
+
While apparently fanciful, reports of an imminent output cut reflect two hard facts: stocks are building faster than \
|
50 |
+
expected, and several producers have an incredibly low pain threshold when it comes to price drops, Antoine Halff, an \
|
51 |
+
energy analyst with Fimat, wrote in a note to clients today. However, more price declines will likely be needed before \
|
52 |
+
OPEC producers decide on any coordinated move.
|
53 |
+
Venezuela, which pumps about 2.5 million barrels a day, said it would cut its daily output by 50,000 barrels, or about 2 \
|
54 |
+
percent, starting Oct. 1. Nigeria said it would trim its exports by 5 percent on the same date, a reduction of about \
|
55 |
+
120,000 barrels a day from its current output of about 3.8 million barrels a day.
|
56 |
+
They are trying to influence the psychology of the market, said Larry Goldstein, a veteran oil analyst and the president \
|
57 |
+
of the Petroleum Industry Research Foundation in New York. Although they are reacting to the reduction in demand, they \
|
58 |
+
are trying to convince the market that they are actually anticipating it, by making cuts ahead of the market. But they \
|
59 |
+
are simply reacting to it, which is how markets should operate."""
|
60 |
|
61 |
import transformers
|
62 |
import os
|
63 |
import torch
|
64 |
os.environ["CUDA_VISIBLE_DEVICES"]="5"
|
65 |
+
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
66 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
67 |
print(device)
|
68 |
|