grammarly / gector

Official implementation of the papers "GECToR – Grammatical Error Correction: Tag, Not Rewrite" (BEA-20) and "Text Simplification by Tagging" (BEA-21)
Apache License 2.0
891 stars 216 forks source link

Predict problem #165

Closed CoderBinGe closed 2 years ago

CoderBinGe commented 2 years ago

Hi, Thanks for your work. I encountered a strange problem when predicting(run predict.py directly via PyCharm), as shown below:

image

I would appreciate if you could give some advice!

skurzhanskyi commented 2 years ago

Hi What command did you use?

CoderBinGe commented 2 years ago

Hi What command did you use?

Hi, It is ok when run with the following command:

python predict.py --model_path plm/roberta_1_gectorv2.th --vocab_path data/output_vocabulary/ --input_file test.txt --output_file result.txt --transformer_model roberta --special_tokens_fix 1

But when I set default values for these parameters(part of screenshot below) and run predict.py directly with PyCharm, I get the strange error in the screenshot above.

image