bert-extractive-summarizer icon indicating copy to clipboard operation
bert-extractive-summarizer copied to clipboard

Run Summarizer model on array of strings

Open ankur287 opened this issue 2 years ago • 2 comments

Hi, How can I run the Summarizer model to predict an array of Strings. Predicting 1 string at a time using a for loop is very slow and not scalable for data with millions of rows. I get the following error when I pass an array:

model(df['text'].values[:1000], ratio=0.50)

ValueError: [E1041] Expected a string, Doc, or bytes as input, but got: <class 'numpy.ndarray'>.

Thanks.

ankur287 avatar Dec 17 '22 00:12 ankur287

I have a similar question. It would be ideal to have this summariser optimised for handling many instances at once or in parallel. As a likely common use case is to summarise many documents at once.

NtaylorOX avatar Jan 03 '23 09:01 NtaylorOX

I am still stuck. Any help on this issue please ?

ankur287 avatar Jan 04 '23 23:01 ankur287