jaimin commited on
Commit
253ce07
Β·
1 Parent(s): 6a9aaab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -31,7 +31,7 @@ def get_paraphrases(text, n_predictions=3, top_k=50, max_length=256, device="cpu
31
  json={"data": [text]},
32
  )
33
  response = r.json()
34
- sentence = response["data"][0])
35
  for sent in sent_tokenize(sentence):
36
  text = "paraphrase: "+sent + " </s>"
37
  encoding = T5_tokenizer.encode_plus(text, padding=True, return_tensors="pt", truncation=True)
@@ -73,7 +73,7 @@ def get_paraphrases_pytorchlight(sentence, n_predictions=3, top_k=50, max_length
73
  json={"data": [text]},
74
  )
75
  response = r.json()
76
- sentence = response["data"][0])
77
  for sent in sent_tokenize(sentence):
78
  text = "paraphrase: "+sent + " </s>"
79
  encoding = tokenizer1.encode_plus(text, padding=True, return_tensors="pt", truncation=True)
 
31
  json={"data": [text]},
32
  )
33
  response = r.json()
34
+ sentence = response["data"][0]
35
  for sent in sent_tokenize(sentence):
36
  text = "paraphrase: "+sent + " </s>"
37
  encoding = T5_tokenizer.encode_plus(text, padding=True, return_tensors="pt", truncation=True)
 
73
  json={"data": [text]},
74
  )
75
  response = r.json()
76
+ sentence = response["data"][0]
77
  for sent in sent_tokenize(sentence):
78
  text = "paraphrase: "+sent + " </s>"
79
  encoding = tokenizer1.encode_plus(text, padding=True, return_tensors="pt", truncation=True)