How tanisha-s0212/web_search works
Web search is a Streamlit app: a user submits a question, chooses search engines and result limits, and receives links plus readable, website-attributed excerpts. The frontend manages chat history and delegates searching and page extraction to the backend pipeline; the search adapters query DuckDuckGo by default, with optional Brave and Google CSE. Extraction fetches result pages, derives readable text, and labels sources. The graph follows sampled calls and README capabilities; optional integrations are shown separately, and unsampled implementation details are not inferred.
Main entry points: pipeline.py Search and extract · app.py Chat and history · __init__.py Engine selection · cite.py URL and website labels
Components 16
Search interface
- Chat and history
frontend/app.py - Result presentation
frontend/ui.py - Streamlit entry
streamlit_app.py
Search orchestration
- Runtime settings
backend/config.py - Search and extract
backend/pipeline.py - Search data models
backend/models.py
Search providers
- Engine selection
backend/search/__init__.py - DuckDuckGo adapter
backend/search/duckduckgo.py - Brave adapter
backend/search/brave.py - Google CSE adapter
backend/search/google_cse.py
Page extraction
- HTML fetching
backend/extract/fetcher.py - Readable text extraction
backend/extract/readability.py - URL and website labels
backend/extract/cite.py
Other components
- Questioner
- Search services
- Public result pages
Connections 22
- Questioner → Chat and history: asks question
README.md - Streamlit entry → Chat and history: starts
streamlit_app.py - Chat and history → Result presentation: renders results
frontend/app.py - Chat and history → Runtime settings: loads settings
frontend/app.py - Chat and history → Engine selection: lists engines
frontend/app.py - Chat and history → Search and extract: searches and extracts
frontend/app.py - Search and extract → Runtime settings: loads settings
backend/pipeline.py - Search and extract → Engine selection: selects engines
backend/pipeline.py - Engine selection → DuckDuckGo adapter: registers
backend/search/__init__.py - Engine selection → Brave adapter: registers optionally
backend/search/__init__.py - Engine selection → Google CSE adapter: registers optionally
backend/search/__init__.py - Search and extract → HTML fetching: fetches pages
backend/pipeline.py - Search and extract → Readable text extraction: extracts text
backend/pipeline.py - Search and extract → URL and website labels: normalizes URLs
backend/pipeline.py - Search and extract → Search data models: builds results
backend/pipeline.py - DuckDuckGo adapter → Search services: queries
backend/search/duckduckgo.py - Brave adapter → Search services: queries
backend/search/brave.py - Google CSE adapter → Search services: queries
backend/search/google_cse.py - DuckDuckGo adapter → URL and website labels: labels websites
backend/search/duckduckgo.py - Brave adapter → URL and website labels: labels websites
backend/search/brave.py - Google CSE adapter → URL and website labels: labels websites
backend/search/google_cse.py - HTML fetching → Public result pages: requests HTML
backend/extract/fetcher.py