Baseline Neural Question Answering application

Hi good people. I built a simple Neural QA app that can easily be used for other documents. The pre-processing is done in another repo, so this is only minimal code for making it work.


and github:

Also, the app crashes quite often, any idea what is going on?

1 Like

Fancy, @jonas-nothnagel and nice idea using haystack, I thought about doing the same.

I’d guess it is cauz of streamlit server issues. Maybe you can share the detailed error messages in the log?If the reason is got out-of-memory, @amey-st might help.

Best regards

Hi @jonas-nothnagel, the app has already crashed, I couldn’t open it :slight_smile:
I just had a quick look at your code, you are using distilbert which is memory consuming.
Try to delete the model and all the variables after the execution of your script

 del tokenizer, model, bi_encoder, question_embedding, ...

Otherwise, it will be stored and accumulated in the memory leading to exceeding the 800 MB RAM limit. (This solved the problem with my app)

hi @chris_klose I haven’t ended up using haystack actually, even though I think it is probably the best available model out there. Should change the description.

@aminey Thanks! Will take care of it :slight_smile: