Jeetandar N Silwani commited on
Commit
91f9b5f
Β·
2 Parent(s): 6ce3fc3ee8c1f1

merge hf space setup

Browse files
Files changed (2) hide show
  1. .gitattributes +35 -0
  2. README.md +14 -105
.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,105 +1,14 @@
1
- # MemoryBot - AI Memory Companion
2
-
3
- A Python/FastAPI rebuild of MemoryBot, an AI-powered application that helps people preserve and interact with memories of loved ones.
4
-
5
- ## Features
6
-
7
- - **User Authentication** - Register/login with secure password hashing and JWT sessions
8
- - **Memory Profiles** - Create profiles for loved ones with biographical details
9
- - **File Upload & Text Extraction** - Upload PDFs, DOCX, TXT, images, audio, and video files. Text is extracted and chunked for RAG.
10
- - **AI-Powered Chat** - Streaming chat with RAG (Retrieval-Augmented Generation) using OpenAI/OpenRouter
11
- - **Vector Search** - Semantic search through memories using embeddings or keyword fallback
12
- - **Voice Features** - Text-to-speech via edge-tts, Speech-to-text via OpenAI Whisper
13
- - **Memory Timeline** - Browse uploaded files and memories
14
- - **Admin Dashboard** - System stats, user management, data export, audit logging
15
-
16
- ## Tech Stack
17
-
18
- - **Backend**: FastAPI + SQLAlchemy + SQLite (PostgreSQL for production)
19
- - **Auth**: bcrypt + JWT (python-jose)
20
- - **AI**: OpenAI/OpenRouter for LLM chat and embeddings
21
- - **Voice**: edge-tts (TTS), OpenAI Whisper API (STT)
22
- - **Frontend**: Jinja2 templates + Tailwind CSS (CDN)
23
- - **File Processing**: PyPDF2, python-docx, custom text extractor
24
-
25
- ## Quick Start
26
-
27
- ```bash
28
- # 1. Create virtual environment
29
- python -m venv venv
30
- venv\Scripts\activate # Windows
31
- # source venv/bin/activate # Mac/Linux
32
-
33
- # 2. Install dependencies
34
- pip install -r requirements.txt
35
-
36
- # 3. Configure environment
37
- copy .env.example .env
38
- # Edit .env with your API keys
39
-
40
- # 4. Seed database with demo data
41
- python seed.py
42
-
43
- # 5. Run the server
44
- python main.py
45
- # Or: uvicorn main:app --reload --port 8000
46
- ```
47
-
48
- Open http://localhost:8000
49
-
50
- ## Demo Accounts
51
-
52
- | Email | Password | Notes |
53
- |-------|----------|-------|
54
- | admin@memorybot.com | admin123 | Admin user |
55
- | demo@memorybot.com | demo123 | Has sample "Margaret Johnson" profile with 6 memories |
56
-
57
- ## AI Configuration
58
-
59
- Set your OpenAI or OpenRouter API key in `.env`:
60
-
61
- ```
62
- OPENAI_API_KEY=sk-...
63
- OPENAI_BASE_URL=https://openrouter.ai/api/v1
64
- CHAT_MODEL=openai/gpt-4o-mini
65
- ```
66
-
67
- Without an API key, the app works in **fallback mode** with rule-based responses.
68
-
69
- ## Project Structure
70
-
71
- ```
72
- memorybot/
73
- β”œβ”€β”€ main.py # FastAPI application entry point
74
- β”œβ”€β”€ config.py # Settings (pydantic-settings)
75
- β”œβ”€β”€ database.py # SQLAlchemy models
76
- β”œβ”€β”€ auth.py # Authentication utilities
77
- β”œβ”€β”€ rag.py # RAG pipeline, embeddings, search
78
- β”œβ”€β”€ text_extractor.py # File text extraction & chunking
79
- β”œβ”€β”€ seed.py # Database seeder
80
- β”œβ”€β”€ routes_auth.py # /auth/* routes
81
- β”œβ”€β”€ routes_profiles.py # /profiles/* routes (CRUD, upload)
82
- β”œβ”€β”€ routes_chat.py # /chat/* routes (streaming SSE)
83
- β”œβ”€β”€ routes_search.py # /search routes
84
- β”œβ”€β”€ routes_admin.py # /admin/* routes
85
- β”œβ”€β”€ routes_voice.py # /voice/* routes (TTS, STT)
86
- β”œβ”€β”€ templates/ # Jinja2 HTML templates
87
- β”‚ β”œβ”€β”€ base.html
88
- β”‚ β”œβ”€β”€ login.html
89
- β”‚ β”œβ”€β”€ register.html
90
- β”‚ β”œβ”€β”€ dashboard.html
91
- β”‚ β”œβ”€β”€ profiles.html
92
- β”‚ β”œβ”€β”€ profile_detail.html
93
- β”‚ β”œβ”€β”€ chat.html
94
- β”‚ β”œβ”€β”€ search.html
95
- β”‚ β”œβ”€β”€ admin.html
96
- β”‚ └── partials/
97
- β”‚ └── sidebar.html
98
- β”œβ”€β”€ static/ # Static assets
99
- β”œβ”€β”€ uploads/ # User uploaded files
100
- └── .env # Environment config
101
- ```
102
-
103
- ## Important Disclaimer
104
-
105
- **MemoryBot is an AI simulation.** The AI is NOT the actual person being remembered. Responses are generated based on uploaded memories and context. This tool is meant to help people preserve and explore memories, not to replicate a person.
 
1
+ ---
2
+ title: Botathon
3
+ emoji: 😻
4
+ colorFrom: blue
5
+ colorTo: pink
6
+ sdk: gradio
7
+ sdk_version: 6.20.0
8
+ python_version: '3.12'
9
+ app_file: app.py
10
+ pinned: false
11
+ short_description: my botathon project- MemoryBot
12
+ ---
13
+
14
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference