second-brain / README.md
eraz3r's picture
Update README.md
9caa92e verified
|
Raw
History Blame Contribute Delete
2.28 kB
---
title: Second Brain
emoji: 🧠
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 6.6.0
python_version: '3.10'
app_file: app.py
pinned: false
---
# 🧠 Second Brain
An intelligent personal productivity app that learns how you work and schedules your day accordingly.
## Features
- **Task Capture** β€” type or speak tasks; AI classifies them across 4 dimensions automatically
- **Life Areas** β€” every task belongs to one of your personal life areas (Work, Health, etc.)
- **Smart Scheduling** β€” AI builds a time-blocked daily plan based on your tasks, context, and learned patterns
- **Habit Tracking** β€” mark tasks as habits with a recurrence interval; they auto-spawn each day
- **Goals** β€” define big-picture goals; AI factors them in when prioritizing
- **Journaling** β€” end-of-day reflection that updates the AI's knowledge of how you work best
## Project Structure
```
second_brain/
β”œβ”€β”€ app.py ← Main Gradio app, all UI + event wiring
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ core/
β”‚ β”œβ”€β”€ __init__.py
β”‚ β”œβ”€β”€ database.py ← SQLite: users, tasks, life areas, goals, AI context
β”‚ β”œβ”€β”€ ai_engine.py ← All Groq API calls (task parsing, scheduling, journaling)
β”‚ └── styles.py ← CSS
└── ui/
└── __init__.py
```
---
## Deploying to HuggingFace Spaces
#### Add your Groq API key as a Secret
In your Space on HuggingFace:
1. Go to **Settings** β†’ **Repository secrets**
2. Click **New secret**
3. Name: `GROQ_API_KEY`
4. Value: your Groq key (starts with `gsk_`)
5. Click **Add secret**
> ⚠️ Never paste your API key directly into any file β€” use secrets only.
---
## Notes
- **Database**: SQLite file `second_brain.db` is created automatically on first run in the app's working directory
- **Voice transcription**: Uses OpenAI Whisper `small` model (~250MB), downloaded on first voice task
- **AI model**: Groq `llama-3.3-70b-versatile` (free tier, ~0.3s response time)
- **Persistence on HF Spaces**: HuggingFace Spaces have ephemeral storage β€” the SQLite DB resets on each restart. For permanent storage, upgrade to a paid Space with persistent storage, or swap `database.py` to use an external DB (Supabase, PlanetScale, etc.)