How nyohleonard-nlktech/name-entity-classifier-or-ml-name-classifier-lstm works
This repository serves a name-entity classifier through a FastAPI endpoint and two equivalent Streamlit interfaces. Each accepts a name, converts it to a padded token sequence, runs a saved attention model, and returns or displays a class and confidence. The model, tokenizer, and label classes are loaded from local artifacts. The README is empty; the graph reflects the inspected source excerpts, which do not show shared application code between the interfaces.
Main entry points: main.py API prediction · app.py UI prediction · streamlit_app.py UI prediction · model_attention_final.keras Attention model
Components 10
User interfaces
- Prediction API
main.py - Streamlit UI
app.py - Streamlit UI
streamlit_app.py
Classification runtime
- API prediction
main.py - UI prediction
app.py - UI prediction
streamlit_app.py
Model artifacts
- Attention model
model_attention_final.keras - Tokenizer
tokenizer.json - Class labels
label_classes.pkl
Other components
- User
Connections 18
- User → Prediction API: submits name
main.py - Prediction API → API prediction: routes prediction
main.py - API prediction → Tokenizer: loads and encodes
main.py - API prediction → Attention model: loads and predicts
main.py - API prediction → Class labels: loads class
main.py - Prediction API → User: returns class
main.py - User → Streamlit UI: enters name
app.py - Streamlit UI → UI prediction: runs prediction
app.py - UI prediction → Tokenizer: loads and encodes
app.py - UI prediction → Attention model: loads and predicts
app.py - UI prediction → Class labels: loads class
app.py - Streamlit UI → User: displays result
app.py - User → Streamlit UI: enters name
streamlit_app.py - Streamlit UI → UI prediction: runs prediction
streamlit_app.py - UI prediction → Tokenizer: loads and encodes
streamlit_app.py - UI prediction → Attention model: loads and predicts
streamlit_app.py - UI prediction → Class labels: loads class
streamlit_app.py - Streamlit UI → User: displays result
streamlit_app.py