Commit
·
d84a343
1
Parent(s):
ba482a7
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ tokenizer = AutoTokenizer.from_pretrained("humarin/chatgpt_paraphraser_on_T5_bas
|
|
13 |
model = AutoModelForSeq2SeqLM.from_pretrained("humarin/chatgpt_paraphraser_on_T5_base")
|
14 |
|
15 |
def paraphrase(
|
16 |
-
|
17 |
num_beams=5,
|
18 |
num_beam_groups=5,
|
19 |
num_return_sequences=5,
|
@@ -24,7 +24,7 @@ def paraphrase(
|
|
24 |
max_length=128
|
25 |
):
|
26 |
input_ids = tokenizer(
|
27 |
-
f'paraphrase: {
|
28 |
return_tensors="pt", padding="longest",
|
29 |
max_length=max_length,
|
30 |
truncation=True,
|
|
|
13 |
model = AutoModelForSeq2SeqLM.from_pretrained("humarin/chatgpt_paraphraser_on_T5_base")
|
14 |
|
15 |
def paraphrase(
|
16 |
+
Content_to_Rephrase,
|
17 |
num_beams=5,
|
18 |
num_beam_groups=5,
|
19 |
num_return_sequences=5,
|
|
|
24 |
max_length=128
|
25 |
):
|
26 |
input_ids = tokenizer(
|
27 |
+
f'paraphrase: {Content_to_Rephrase}',
|
28 |
return_tensors="pt", padding="longest",
|
29 |
max_length=max_length,
|
30 |
truncation=True,
|