You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello,when i try to run the QGwithAns code, I download the model from hugging face and save in the local path.
butu when load the model from local path, there is an error occur. nlp = T5_QG.pipeline("question-generation", model='valhalla/t5-base-qg-hl', qg_format="highlight")
I change the model para above to local path like './Pretrained_Models/t5_base_qg_hl' nlp = T5_QG.pipeline("question-generation", model='./Pretrained_Models/t5_base_qg_hl', qg_format="highlight")
but there is an error below.
│ 307 │ │ return _sentencepiece.SentencePieceProcessor_serialized_model │
│ 308 │ │
│ 309 │ def LoadFromFile(self, arg): │
│ ❱ 310 │ │ return _sentencepiece.SentencePieceProcessor_LoadFromFile(sel │
│ 311 │ │
│ 312 │ def _EncodeAsIds(self, text, enable_sampling, nbest_size, alpha, │
│ 313 │ │ return _sentencepiece.SentencePieceProcessor__EncodeAsIds(sel │
╰──────────────────────────────────────────────────────────────────────────────╯
TypeError: not a string
how to fix it?
The text was updated successfully, but these errors were encountered:
hello,when i try to run the QGwithAns code, I download the model from hugging face and save in the local path.
butu when load the model from local path, there is an error occur.
nlp = T5_QG.pipeline("question-generation", model='valhalla/t5-base-qg-hl', qg_format="highlight")
I change the model para above to local path like './Pretrained_Models/t5_base_qg_hl'
nlp = T5_QG.pipeline("question-generation", model='./Pretrained_Models/t5_base_qg_hl', qg_format="highlight")
but there is an error below.
│ 307 │ │ return _sentencepiece.SentencePieceProcessor_serialized_model │
│ 308 │ │
│ 309 │ def LoadFromFile(self, arg): │
│ ❱ 310 │ │ return _sentencepiece.SentencePieceProcessor_LoadFromFile(sel │
│ 311 │ │
│ 312 │ def _EncodeAsIds(self, text, enable_sampling, nbest_size, alpha, │
│ 313 │ │ return _sentencepiece.SentencePieceProcessor__EncodeAsIds(sel │
╰──────────────────────────────────────────────────────────────────────────────╯
TypeError: not a string
how to fix it?
The text was updated successfully, but these errors were encountered: