FocusFlow Assistant commited on
Commit Β·
77280d2
1
Parent(s): 740d386
docs: Comprehensive README update
Browse files- Added features list and architecture diagram
- Documented cloud vs local deployment
- Added quick start guide
- Included environment variables reference
- Added links to live demo and docs
README.md
CHANGED
|
@@ -10,10 +10,156 @@ pinned: false
|
|
| 10 |
|
| 11 |
# π FocusFlow - AI Study Companion
|
| 12 |
|
| 13 |
-
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
-
**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
# π FocusFlow - AI Study Companion
|
| 12 |
|
| 13 |
+
An intelligent study assistant powered by AI that transforms your learning materials into personalized, adaptive study experiences.
|
| 14 |
|
| 15 |
+
## β¨ Features
|
| 16 |
|
| 17 |
+
- **π Multi-Subject Study Planning**: Upload PDFs and get automated multi-day study plans
|
| 18 |
+
- **π¬ RAG-Powered Q&A**: Ask questions and get answers with source citations
|
| 19 |
+
- **π Adaptive Quizzes**: Context-based quizzes that adapt to your performance
|
| 20 |
+
- **π Progress Tracking**: Track mastery levels and quiz history
|
| 21 |
+
- **π― Smart Day Progression**: Automatically unlocks new topics as you complete them
|
| 22 |
+
- **π Source Citations**: Every answer cites the exact source and page number
|
| 23 |
+
- **βοΈ Cloud Persistence**: Study plans and progress persist across sessions (cloud demo only)
|
| 24 |
+
- **π₯ Multi-User Support**: Each browser session maintains isolated data
|
| 25 |
|
| 26 |
+
## π Live Demo
|
| 27 |
+
|
| 28 |
+
**[Try FocusFlow on Hugging Face Spaces](https://huggingface.co/spaces/SivaRohith69/focusflow)**
|
| 29 |
+
|
| 30 |
+
> **Note**: The cloud demo uses ephemeral containers. Your data persists in Supabase but each browser tab is treated as a separate user. For true persistent local storage, use the local deployment below.
|
| 31 |
+
|
| 32 |
+
## π€ Models Used
|
| 33 |
+
|
| 34 |
+
### Cloud Demo (HF Spaces)
|
| 35 |
+
- **LLM**: Meta-Llama-3-8B-Instruct (via Hugging Face Inference API)
|
| 36 |
+
- **Embeddings**: sentence-transformers/all-MiniLM-L6-v2
|
| 37 |
+
|
| 38 |
+
### Local Deployment
|
| 39 |
+
- **LLM**: llama3.2:1b (via Ollama - offline)
|
| 40 |
+
- **Embeddings**: nomic-embed-text (offline)
|
| 41 |
+
|
| 42 |
+
## π» Local Installation
|
| 43 |
+
|
| 44 |
+
### Prerequisites
|
| 45 |
+
- Python 3.10+
|
| 46 |
+
- [Ollama](https://ollama.ai/) installed and running
|
| 47 |
+
- 8GB+ RAM recommended
|
| 48 |
+
|
| 49 |
+
### Quick Start
|
| 50 |
+
|
| 51 |
+
```bash
|
| 52 |
+
# Clone the repository
|
| 53 |
+
git clone https://github.com/thesivarohith/hack.git
|
| 54 |
+
cd hack
|
| 55 |
+
|
| 56 |
+
# Create virtual environment
|
| 57 |
+
python -m venv venv
|
| 58 |
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
| 59 |
+
|
| 60 |
+
# Install dependencies
|
| 61 |
+
pip install -r requirements.txt
|
| 62 |
+
|
| 63 |
+
# Pull required Ollama models
|
| 64 |
+
ollama pull llama3.2:1b
|
| 65 |
+
ollama pull nomic-embed-text
|
| 66 |
+
|
| 67 |
+
# Start the backend
|
| 68 |
+
uvicorn backend.main:app --reload &
|
| 69 |
+
|
| 70 |
+
# Start the frontend
|
| 71 |
+
streamlit run app.py
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
Visit `http://localhost:8501` to use the app!
|
| 75 |
+
|
| 76 |
+
## π― How to Use
|
| 77 |
+
|
| 78 |
+
1. **Upload PDFs**: Add your study materials in the Sources panel
|
| 79 |
+
2. **Generate Plan**: Ask the Calendar to create a study plan (e.g., "Make a 5-day plan")
|
| 80 |
+
3. **Study**: Click on topics to view lessons and ask questions
|
| 81 |
+
4. **Take Quizzes**: Test your knowledge and unlock new topics
|
| 82 |
+
5. **Track Progress**: View analytics and mastery levels
|
| 83 |
+
|
| 84 |
+
## ποΈ Architecture
|
| 85 |
+
|
| 86 |
+
```
|
| 87 |
+
βββββββββββββββββββββββββββββββββββββββββββ
|
| 88 |
+
β Streamlit Frontend β
|
| 89 |
+
β (Material Design UI + Calendar) β
|
| 90 |
+
ββββββββββββββββ¬βββββββββββββββββββββββββββ
|
| 91 |
+
β
|
| 92 |
+
βββββββββΌβββββββββ
|
| 93 |
+
β FastAPI β
|
| 94 |
+
β Backend β
|
| 95 |
+
βββββββββ¬βββββββββ
|
| 96 |
+
β
|
| 97 |
+
ββββββββββββΌβββββββββββ
|
| 98 |
+
β β β
|
| 99 |
+
βββββΌβββββ ββββΌβββββ ββββΌββββββββββ
|
| 100 |
+
β ChromaDBβ β LLM β β Supabase β
|
| 101 |
+
β (RAG) β β β β (Cloud DB)β
|
| 102 |
+
βββββββββββ βββββββββ βββββββββββββ
|
| 103 |
+
```
|
| 104 |
+
|
| 105 |
+
## π οΈ Tech Stack
|
| 106 |
+
|
| 107 |
+
- **Frontend**: Streamlit + Material Design
|
| 108 |
+
- **Backend**: FastAPI + LangChain
|
| 109 |
+
- **Vector DB**: ChromaDB
|
| 110 |
+
- **LLM**: Ollama (local) / HuggingFace (cloud)
|
| 111 |
+
- **Database**: Supabase PostgreSQL (cloud) / JSON files (local)
|
| 112 |
+
|
| 113 |
+
## π₯οΈ Cloud vs Local
|
| 114 |
+
|
| 115 |
+
| Feature | Local | Cloud (HF Spaces) |
|
| 116 |
+
|---------|-------|-------------------|
|
| 117 |
+
| **Privacy** | β
Fully offline | β οΈ Data in cloud |
|
| 118 |
+
| **Cost** | β
Free | β
Free |
|
| 119 |
+
| **Speed** | β οΈ Depends on hardware | β
Fast |
|
| 120 |
+
| **Persistence** | β
Local files | β
Supabase DB |
|
| 121 |
+
| **Setup** | β οΈ Requires Ollama | β
Just click |
|
| 122 |
+
| **Multi-user** | β Single user | β
Multi-user |
|
| 123 |
+
|
| 124 |
+
## π Configuration
|
| 125 |
+
|
| 126 |
+
### Environment Variables
|
| 127 |
+
|
| 128 |
+
For cloud deployment, set these in Hugging Face Spaces Settings:
|
| 129 |
+
|
| 130 |
+
```bash
|
| 131 |
+
# Required for cloud mode
|
| 132 |
+
HUGGINGFACE_API_TOKEN=your_hf_token
|
| 133 |
+
SUPABASE_URL=your_supabase_url
|
| 134 |
+
SUPABASE_KEY=your_supabase_key
|
| 135 |
+
USE_SUPABASE=true
|
| 136 |
+
LLM_PROVIDER=huggingface
|
| 137 |
+
```
|
| 138 |
+
|
| 139 |
+
For local deployment, no configuration needed!
|
| 140 |
+
|
| 141 |
+
## π Privacy
|
| 142 |
+
|
| 143 |
+
- **Local Mode**: All data stays on your machine. No internet required.
|
| 144 |
+
- **Cloud Mode**: Study plans stored in Supabase. PDFs processed in-memory, not stored.
|
| 145 |
+
|
| 146 |
+
## π License
|
| 147 |
+
|
| 148 |
+
MIT License - See [LICENSE](LICENSE) for details.
|
| 149 |
+
|
| 150 |
+
## π€ Contributing
|
| 151 |
+
|
| 152 |
+
Contributions welcome! Please feel free to submit a Pull Request.
|
| 153 |
+
|
| 154 |
+
## π§ Contact
|
| 155 |
+
|
| 156 |
+
For questions or feedback, open an issue on [GitHub](https://github.com/thesivarohith/hack/issues).
|
| 157 |
+
|
| 158 |
+
---
|
| 159 |
+
|
| 160 |
+
**Built with β€οΈ for better learning experiences**
|
| 161 |
+
|
| 162 |
+
π **Links:**
|
| 163 |
+
- [Live Demo](https://huggingface.co/spaces/SivaRohith69/focusflow)
|
| 164 |
+
- [GitHub Repository](https://github.com/thesivarohith/hack)
|
| 165 |
+
- [Documentation](https://github.com/thesivarohith/hack/blob/main/DEPLOYMENT.md)
|