haonan-li / MultiSpanQA

MultiSpanQA: A Dataset for Multi-Span Question Answering
27 stars 10 forks source link

How to predict/inference using the model? #4

Closed gokul427 closed 1 year ago

gokul427 commented 1 year ago

Hi,

I am new to using transformer models. Can you please help me how to make predictions after fine tuning the model.

Thanks,

haonan-li commented 1 year ago

Hi

If you have a 'test.json' file, add the flag --do-predict, it will do prediction on the file automatically. See code in 'run_tagger.py'

if training_args.do_predict: data_files['test'] = os.path.join(data_args.data_dir, "test.json")