utkarsh4430
commited on
Commit
•
7b8dc71
1
Parent(s):
a953324
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,26 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
---
|
4 |
+
|
5 |
+
The model is used to expand abstract sentences. Use the following demo code to generate diverse expansions from abstract inputs.
|
6 |
+
|
7 |
+
```python
|
8 |
+
from transformers import pipeline, AutoTokenizer
|
9 |
+
tokenizer = AutoTokenizer.from_pretrained('utkarsh4430/ABEX-abstract-expand')
|
10 |
+
model_pipeline = pipeline("text2text-generation", model='utkarsh4430/ABEX-abstract-expand', tokenizer=tokenizer)
|
11 |
+
|
12 |
+
input_text = 'A chance to meet WWE stars and support a good cause.'
|
13 |
+
|
14 |
+
for f in range(5):
|
15 |
+
generated_text = model_pipeline(input_text, num_beams=1, top_k=100, do_sample=True, max_length=350, num_return_sequences=1)
|
16 |
+
print(f'Aug {f}: ', generated_text[0]['generated_text'])
|
17 |
+
```
|
18 |
+
|
19 |
+
Example output:
|
20 |
+
```
|
21 |
+
Aug 0: WWE stars to visit Detroit on January 20th for the second time in three years, with appearances at The Battle at the Fox Sports 1 World Headquarters, and proceeds going to a charity of your choice.
|
22 |
+
Aug 1: A one-on-one experience at the WWE Creative Conference in New Jersey was provided, with an opportunity for the audience to meet WWE superstars and support a good cause.
|
23 |
+
Aug 2: Sindrun welcomes WWE star Chris Jericho and hosts an event for attendees to meet WWE stars and support a local cause.
|
24 |
+
Aug 3: Find out if you can meet WWE stars, including the Rock and Shake, at a benefit luncheon.
|
25 |
+
Aug 4: The WWE Talent Showcase 2019 will feature exciting moments inside the WWE Studios, including the first one in over a decade, and features a chance to hug current and former stars and receive a check from a corporate sponsor.
|
26 |
+
```
|