dmmiller612 / bert-extractive-summarizer

Easy to use extractive text summarization with BERT
MIT License
1.37k stars 307 forks source link

Run Summarizer model on array of strings #148

Open ankur287 opened 1 year ago

ankur287 commented 1 year ago

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.

NtaylorOX commented 1 year ago

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.

ankur287 commented 1 year ago

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