Views
No views yet
1from plan_simp.models.bart import load_simplifier
2
3simplifier, tokenizer, hparams = load_simplifier("liamcripwell/ledpara")
4
5text = "<RL_3> Turing has an extensive legacy with statues of him and many things named after him, including an annual award for computer science innovations. He appears on the current Bank of England £50 note, which was released on 23 June 2021, to coincide with his birthday. A 2019 BBC series, as voted by the audience, named him the greatest person of the 20th century."
6inputs = tokenizer(text, return_tensors="pt")
7outputs = model.generate(**inputs, num_beams=5)1python plan_simp/scripts/generate.py inference
2 --model_ckpt=liamcripwell/ledpara
3 --test_file=<test_data>
4 --reading_lvl=s_level
5 --out_file=<output_csv>
6
7python plan_simp/scripts/eval_simp.py
8 --input_data=newselaauto_docs_test.csv
9 --output_data=test_out_ledpara.csv
10 --x_col=complex_str
11 --r_col=simple_str
12 --y_col=pred
13 --doc_id_col=pair_id
14 --prepro=True
15 --sent_level=True