Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -71,12 +71,12 @@ def rank_candidate_text(sentences):
|
|
71 |
|
72 |
|
73 |
def full_pipeline(source, simpl_model, simpl_tok, tokens, lexical=False):
|
74 |
-
|
75 |
modified, complex_words = id_replace_complex(source, threshold=0.2) if lexical else (source, None)
|
76 |
-
cands = generate_candidate_text(tokens+modified simpl_model, simpl_tok)
|
77 |
output = rank_candidate_text(cands)
|
78 |
return output, complex_words
|
79 |
-
|
80 |
def main():
|
81 |
|
82 |
aug_tok = ['c_', 'lev_', 'dep_', 'rank_', 'rat_', 'n_syl_']
|
|
|
71 |
|
72 |
|
73 |
def full_pipeline(source, simpl_model, simpl_tok, tokens, lexical=False):
|
74 |
+
|
75 |
modified, complex_words = id_replace_complex(source, threshold=0.2) if lexical else (source, None)
|
76 |
+
cands = generate_candidate_text(tokens+modified, simpl_model, simpl_tok)
|
77 |
output = rank_candidate_text(cands)
|
78 |
return output, complex_words
|
79 |
+
|
80 |
def main():
|
81 |
|
82 |
aug_tok = ['c_', 'lev_', 'dep_', 'rank_', 'rat_', 'n_syl_']
|