Recommend Questions based on user's text
This project performs the following
- Takes a large text file of more than 3000 words.
- Clean the data, convert into batches of 2048 tokens.
- Pass each batch to led_base_book_summary model to generate summaries.
- Collect all summaries in a text file.
- Pass the summaries data to T5 model to generate a set of questions.
- Store the question bank in a text file.
- Create a flask app that suggest questions similar to user input using Bert.
RJ.txt : large text file
Summary.txt : file containing summaries of RJ.txt
As.txt : file containing set of Questions
Replace the qs.txt with your own Questions.
git clone https://github.com/hafsabukhary/Question_Recommender.git
cd Question_Recommender
pip install -r requirements.txt
Python app.py
curl -X POST -H "Content-Type: application/json" -d '{"user_input": "Romeo Juliet?"}' http://127.0.0.1:5000/get_similar_questions
Run the Generate Questions from large data.ipynb to generate Questions from RJ.txt