Update README.md
Browse files
README.md
CHANGED
|
@@ -52,13 +52,12 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
| 52 |
model.to(device)
|
| 53 |
model.eval()
|
| 54 |
|
| 55 |
-
|
| 56 |
def paraphrase(text, num_return_sequences=3):
|
| 57 |
"""
|
| 58 |
Generate paraphrases for a given Polish input sentence.
|
| 59 |
"""
|
| 60 |
|
| 61 |
-
#
|
| 62 |
input_text = f"Parafrazuj: {text}"
|
| 63 |
|
| 64 |
inputs = tokenizer(
|
|
@@ -140,13 +139,12 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
| 140 |
model.to(device)
|
| 141 |
model.eval()
|
| 142 |
|
| 143 |
-
|
| 144 |
def paraphrase(text, num_return_sequences=3):
|
| 145 |
"""
|
| 146 |
Generate paraphrases for a given Polish input sentence.
|
| 147 |
"""
|
| 148 |
|
| 149 |
-
#
|
| 150 |
input_text = f"Parafrazuj: {text}"
|
| 151 |
|
| 152 |
inputs = tokenizer(
|
|
|
|
| 52 |
model.to(device)
|
| 53 |
model.eval()
|
| 54 |
|
|
|
|
| 55 |
def paraphrase(text, num_return_sequences=3):
|
| 56 |
"""
|
| 57 |
Generate paraphrases for a given Polish input sentence.
|
| 58 |
"""
|
| 59 |
|
| 60 |
+
# The model requires this prefix
|
| 61 |
input_text = f"Parafrazuj: {text}"
|
| 62 |
|
| 63 |
inputs = tokenizer(
|
|
|
|
| 139 |
model.to(device)
|
| 140 |
model.eval()
|
| 141 |
|
|
|
|
| 142 |
def paraphrase(text, num_return_sequences=3):
|
| 143 |
"""
|
| 144 |
Generate paraphrases for a given Polish input sentence.
|
| 145 |
"""
|
| 146 |
|
| 147 |
+
# The model requires this prefix
|
| 148 |
input_text = f"Parafrazuj: {text}"
|
| 149 |
|
| 150 |
inputs = tokenizer(
|