Welcome to the Missing Word Prediction and Attention Visualizer!
This interactive web app lets you explore how BERT predicts missing words in sentences and visually understand its attention mechanisms.
-
Masked Word Prediction:
Enter a sentence with the[MASK]token and see BERT's top 3 predictions for the missing word. -
Attention Visualization:
View attention heatmaps for every layer and head in BERT, showing how the model focuses on different words. -
User-Friendly Interface:
Clean, responsive design with example prompts and instant feedback.
coming very soon... (currently searching for free deployment)
- Enter a prompt in input section with the [MASK] token.
- Click
predict ✦ - Voila! You will have got the 3 best Predicton
- To see attention images, click
view attention imagesbutton at bottom, it will drop down with images grid
1. Clone the Repository
git clone https://github.com/Adya-Prasad/Missing-Word-Prediction-and-Attention-Visualizer-with-BERT.git2. Move the application directory
cd Missing-Word-Prediction-and-Attention-Visualizer-with-BERT
3.Install dependencies I recommend to use a virtual environment
pip install -r requirements.txt
4. Finally! run the application (test it rigorously)
python app.py
This repo is open for contribution, I would love to have you onboard
- Repeat the same above
⏯ Quick Startstep - Create a new branch
contri - Do experiments, and test it. After correction implementation, PR it.
