Summary
Create a Streamlit-based prototype to expose core NLP features (QA, summarization, sentiment, entity lookup) via a simple web UI.
Motivation
- Quickly validate user flows and UX before investing in a full React/FastAPI frontend.
- Allow interns to see end-to-end integration of pipeline functions in a live interface.
- Iterate rapidly on feature set based on user feedback.
Scope
In scope: implementation, tests
Acceptance Criteria
Additional Context
Details
-
Category: ui
-
Priority: P1
-
Estimate: 2d
-
Dependencies:
- Core NLP functions available:
retrieve_context, generate_answer, summarize, analyze_sentiment, extract_entities
streamlit added to /ui/requirements.txt
- Database connection module (
nlp/db.py)
-
Prototype feature set:
- Question-Answering: text input for question, slider for
top_k, displays answer + source snippets
- Summarization: select article or paste text, button to generate TL;DR
- Sentiment: select article, button to show sentiment label & score
- Entity Lookup: select article, display detected entities by type
- Navigation: sidebar menu to switch between features
Tasks
- Add dependencies
- Add
streamlit to /ui/requirements.txt.
- Prototype app
- Create
/ui/streamlit_app.py that:
- Imports core functions from
nlp/core.py
- Uses
streamlit.sidebar.selectbox for feature selection
- For each feature, uses the appropriate widgets (
text_input, slider, button, write) to capture inputs and display outputs
- Run instruction
- Document:
streamlit run ui/streamlit_app.py
- Smoke test
- Verify the app launches locally and each feature page loads without errors
- Documentation
- Update
/ui/README.md with setup steps, run command, and screenshots of each feature
Summary
Create a Streamlit-based prototype to expose core NLP features (QA, summarization, sentiment, entity lookup) via a simple web UI.
Motivation
Scope
In scope: implementation, tests
Acceptance Criteria
/ui/README.mdclearly explains installation, run command, and feature usageAdditional Context
Details
Category: ui
Priority: P1
Estimate: 2d
Dependencies:
retrieve_context,generate_answer,summarize,analyze_sentiment,extract_entitiesstreamlitadded to/ui/requirements.txtnlp/db.py)Prototype feature set:
top_k, displays answer + source snippetsTasks
streamlitto/ui/requirements.txt./ui/streamlit_app.pythat:nlp/core.pystreamlit.sidebar.selectboxfor feature selectiontext_input,slider,button,write) to capture inputs and display outputs/ui/README.mdwith setup steps, run command, and screenshots of each feature