Closed zqlearning closed 4 years ago
Maybe you are reloading the model everytime ? Try to instanciate an models.text.OpenAI_GPT model and use its text2vec method instead. You might have to delete the "dim" parameter from the parent TextEmbedding class init method first as it is not passed by the OpenAI_GPT init method and is unused anyway.
thank you. I have solved my problem.
I am trying to extract text feature using 'sent_feat_demo.py' or modules in 'model/text.py', but extracting one by one is pretty slowly when use 'openai' style,especially when I have to deal with lots of sentence.
could you give me some advice or tell me how you do that?
thank you very much.