Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ mdl = T5ForConditionalGeneration.from_pretrained("t5-small")
|
|
7 |
|
8 |
|
9 |
def text2text_paraphrase(sentence1,sentence2):
|
10 |
-
inp1 = "
|
11 |
inp2 = "sentence2: "+sentence2
|
12 |
combined_inp=inp1+" "+inp2
|
13 |
enc = text2text_tkn(combined_inp, return_tensors="pt")
|
@@ -17,5 +17,5 @@ def text2text_paraphrase(sentence1,sentence2):
|
|
17 |
|
18 |
sent1=grad.Textbox(lines=1, label="Sentence1", placeholder="Text in English")
|
19 |
sent2=grad.Textbox(lines=1, label="Sentence2", placeholder="Text in English")
|
20 |
-
out=grad.Textbox(lines=1, label="Whether
|
21 |
grad.Interface(text2text_paraphrase, inputs=[sent1,sent2], outputs=out).launch()
|
|
|
7 |
|
8 |
|
9 |
def text2text_paraphrase(sentence1,sentence2):
|
10 |
+
inp1 = "rte sentence1: "+sentence1
|
11 |
inp2 = "sentence2: "+sentence2
|
12 |
combined_inp=inp1+" "+inp2
|
13 |
enc = text2text_tkn(combined_inp, return_tensors="pt")
|
|
|
17 |
|
18 |
sent1=grad.Textbox(lines=1, label="Sentence1", placeholder="Text in English")
|
19 |
sent2=grad.Textbox(lines=1, label="Sentence2", placeholder="Text in English")
|
20 |
+
out=grad.Textbox(lines=1, label="Whether sentence2 is deductible from sentence1")
|
21 |
grad.Interface(text2text_paraphrase, inputs=[sent1,sent2], outputs=out).launch()
|