How mehulsingh08/kg-summarizer works
Project Type and Purpose
• This is a two‐tier full-stack NLP web application for “Educational Text Summarization using Knowledge Graphs.”
• Frontend: a Streamlit UI (frontend/app.py) that users interact with in the browser (http://localhost:8501).
• Backend: a Flask API server (backend/app.py) that hosts the summarization logic and ML components (http://127.0.0.1:5000).
• Purpose: take input text (e.g., arXiv abstracts), apply a hybrid unsupervised summarization pipeline (TF-IDF vectorizer, K-Means clustering, sentence-importance learner, enhanced TextRank), and return a summary.
File Structure
• Top-level directories:
• backend/ – Flask app, ML logic (model.py), utilities (utils.py), pre-trained artifacts (.pkl) and dependencies.
• frontend/ – Streamlit app presenting the web UI and calling the backend API.
• data/ – static CSV datasets (arxiv_data.csv, test_set.csv).
• Important files:
• backend/models/*.pkl – pre-trained vectorizer, cluster model, weights, etc.
• test_setup.py – likely orchestration or CI checks.
• requirements.txt in each tier – defines Python dependencies.
• Architectural hints:
• Clear separation of concerns: UI vs API vs ML pipeline.
• No external database—uses file‐based persisted models and CSV.
README for Additional Insights
• The README confirms a two-process setup (Flask + Streamlit).
• Lists the four ML components that form the hybrid summarizer.
Detail
• Every .pkl artifact as a child node of the Model Store.
• Utils.py usage: preprocessing → vectorizer.
• Sequence: vectorizer → clustering → sentence scorer → TextRank → postprocessing.