question_generation icon indicating copy to clipboard operation
question_generation copied to clipboard

Use datasets instead of nlp. And add requirements.txt.

Open ZZZZkp opened this issue 10 months ago • 1 comments

Nlp hasn't been updated in a long time and conflicts with the latest dill. So I replaced nlp with datasets. Now it can preprocess the data correctly.

ZZZZkp avatar Apr 05 '24 13:04 ZZZZkp

Thanks @ZZZZkp for that fix. However, the question_generation.ipynb file still does not work, returning the next message:

`ValueError Traceback (most recent call last) in <cell line: 1>() ----> 1 nlp(text3)

1 frames /content/question_generation/pipelines.py in _prepare_inputs_for_qg_from_answers_hl(self, sents, answers) 140 answer_text = answer_text.strip() 141 --> 142 ans_start_idx = sent.index(answer_text) 143 144 sent = f"{sent[:ans_start_idx]} {answer_text} {sent[ans_start_idx + len(answer_text): ]}"

ValueError: substring not found`

Do you have any remedy here?

terry07 avatar Jul 18 '24 13:07 terry07