prithivida
commited on
Commit
•
ffa21e7
1
Parent(s):
d66575d
Update README.md
Browse files
README.md
CHANGED
@@ -12,18 +12,22 @@ pip install git+https://github.com/PrithivirajDamodaran/Parrot.git
|
|
12 |
### Quickstart
|
13 |
```python
|
14 |
|
|
|
|
|
15 |
from parrot import Parrot
|
16 |
import warnings
|
17 |
warnings.filterwarnings("ignore")
|
18 |
|
|
|
19 |
parrot = Parrot(model_tag="prithivida/parrot_paraphraser_on_T5", use_gpu=False)
|
|
|
20 |
phrases = ["Can you recommed some upscale restaurants in Rome?",
|
21 |
"What are the famous places we should not miss in Russia?"
|
22 |
]
|
23 |
|
24 |
for phrase in phrases:
|
25 |
print("-"*100)
|
26 |
-
print(phrase)
|
27 |
print("-"*100)
|
28 |
para_phrases = parrot.augment(input_phrase=phrase)
|
29 |
for para_phrase in para_phrases:
|
@@ -31,8 +35,6 @@ for phrase in phrases:
|
|
31 |
```
|
32 |
|
33 |
<pre>
|
34 |
-
|
35 |
-
|
36 |
-----------------------------------------------------------------------------
|
37 |
Input_phrase: Can you recommed some upscale restaurants in Rome?
|
38 |
-----------------------------------------------------------------------------
|
@@ -54,7 +56,6 @@ Input_phrase: What are the famous places we should not miss in Russia
|
|
54 |
"what are some of the most important places to visit in russia?"
|
55 |
"what are some of the most famous places of russia?"
|
56 |
"what are some places we should not miss in russia?"
|
57 |
-
|
58 |
</pre>
|
59 |
|
60 |
### Knobs
|
|
|
12 |
### Quickstart
|
13 |
```python
|
14 |
|
15 |
+
# Caveat: the generate part is NOT seeded, so for a same input, multiple runs will produce DIFFERENT outputs for now
|
16 |
+
|
17 |
from parrot import Parrot
|
18 |
import warnings
|
19 |
warnings.filterwarnings("ignore")
|
20 |
|
21 |
+
#Init models (make sure you init ONLY once if you integrate this to your code)
|
22 |
parrot = Parrot(model_tag="prithivida/parrot_paraphraser_on_T5", use_gpu=False)
|
23 |
+
|
24 |
phrases = ["Can you recommed some upscale restaurants in Rome?",
|
25 |
"What are the famous places we should not miss in Russia?"
|
26 |
]
|
27 |
|
28 |
for phrase in phrases:
|
29 |
print("-"*100)
|
30 |
+
print("Input_phrase: ", phrase)
|
31 |
print("-"*100)
|
32 |
para_phrases = parrot.augment(input_phrase=phrase)
|
33 |
for para_phrase in para_phrases:
|
|
|
35 |
```
|
36 |
|
37 |
<pre>
|
|
|
|
|
38 |
-----------------------------------------------------------------------------
|
39 |
Input_phrase: Can you recommed some upscale restaurants in Rome?
|
40 |
-----------------------------------------------------------------------------
|
|
|
56 |
"what are some of the most important places to visit in russia?"
|
57 |
"what are some of the most famous places of russia?"
|
58 |
"what are some places we should not miss in russia?"
|
|
|
59 |
</pre>
|
60 |
|
61 |
### Knobs
|