Vaishakhh commited on
Commit
655bbff
1 Parent(s): 54acd71

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -11,7 +11,7 @@ Original file is located at
11
  # importing the libraries
12
  import os
13
  import pandas as pd
14
- from parrot import Parrot
15
  import torch
16
  import warnings
17
  import nltk
@@ -36,11 +36,11 @@ fluency_score = Fluency()
36
  diversity_score= Diversity()
37
  device= "cuda:0"
38
  adequacy_threshold = 0.90
39
- fluency_threshold = 0.90
40
  diversity_ranker="levenshtein"
41
- do_diverse=False
42
  #num_beam_groups=num_beams, diversity_penalty=0.5
43
-
44
  # adding the model
45
 
46
  model_name = 'tuner007/pegasus_paraphrase'
 
11
  # importing the libraries
12
  import os
13
  import pandas as pd
14
+ from parrot import Parrot #Parrot offers knobs to control Adequacy, Fluency and Diversity metrics
15
  import torch
16
  import warnings
17
  import nltk
 
36
  diversity_score= Diversity()
37
  device= "cuda:0"
38
  adequacy_threshold = 0.90
39
+ fluency_threshold = 0.90 # Fluency (Is the paraphrase fluent English?)
40
  diversity_ranker="levenshtein"
41
+ do_diverse=False # Diversity (Lexical / Phrasal / Syntactical) (How much has the paraphrase changed the original sentence?)
42
  #num_beam_groups=num_beams, diversity_penalty=0.5
43
+ #num_beam_groups (int) — Number of groups to divide num_beams into in order to ensure diversity among different groups of beams
44
  # adding the model
45
 
46
  model_name = 'tuner007/pegasus_paraphrase'