How hussain-reddy/secondbrain works
SecondBrain is a Streamlit app for asking questions about uploaded PDFs. Its main workflow extracts PDF text, chunks it, builds a vector store, retrieves relevant chunks for a question, and sends context to Gemini for an answer. The repository also contains a separate reusable QA-chain builder and a PDF loader, but the sampled app does not call either. Evidence is limited to the README URL and the supplied source excerpts; the README itself documents no additional capabilities.
Main entry points: app.py Streamlit app · vectorstore.py Vector store · llm_chain.py QA chain builder · chunker.py Text chunker
Components 8
User workflow
- Streamlit app
app.py
Document processing
- Text chunker
src/chunker.py - Vector store
src/vectorstore.py - PDF loader
src/loader.py
Question answering
- Context retrieval
app.py - QA chain builder
src/llm_chain.py
Other components
- User
- Google Gemini
Connections 7
- User → Streamlit app: uploads PDF
app.py - Streamlit app → Text chunker: chunks text
app.py - Streamlit app → Vector store: builds index
app.py - Streamlit app → Context retrieval: submits question
app.py - Context retrieval → Vector store: retrieves chunks
app.py - Context retrieval → Google Gemini: sends context
app.py - QA chain builder → Google Gemini: configures model
src/llm_chain.py