--- title: JARVIS - Personal AI Agent emoji: ๐Ÿค– colorFrom: blue colorTo: gray sdk: gradio sdk_version: "4.26.0" app_file: app.py pinned: true license: mit tags: - conversational - personal-assistant - llm - phi-3 - jarvis - voice - memory - agentic hardware: cpu-upgrade --- # J.A.R.V.I.S โ€” Just A Rather Very Intelligent System > *"Sometimes you gotta run before you can walk."* Your personal AI assistant โ€” conversational, voice-enabled, and memory-powered. Runs locally on a HuggingFace Space with **16 GB RAM** and no GPU required (thanks to 4-bit quantisation). --- ## โœจ Features | Feature | Detail | |---|---| | ๐Ÿง  **Local LLM** | Microsoft Phi-3-mini-4k-instruct (3.8B params, 4-bit โ‰ˆ 2-4 GB RAM) | | ๐Ÿ’ฌ **Chat interface** | Clean Gradio UI โ€” type or use voice | | ๐ŸŽ™๏ธ **Voice replies** | Edge-TTS (Microsoft GuyNeural, no GPU, minimal cloud) | | ๐Ÿ—‚๏ธ **Persistent memory** | SQLite facts + conversation history | | ๐Ÿ’ก **Thinking engine** | Background anticipation โ€” JARVIS predicts your needs | | ๐Ÿ”ง **Commands** | `status` ยท `remember X is Y` ยท `anticipate` | --- ## ๐Ÿš€ Quick Start (local) ```bash git clone https://huggingface.co/spaces//jarvis cd jarvis pip install -r requirements.txt python app.py ``` Open `http://localhost:7860` in your browser. --- ## โš™๏ธ Environment Variables | Variable | Default | Description | |---|---|---| | `JARVIS_MODEL` | `microsoft/Phi-3-mini-4k-instruct` | HuggingFace model ID | | `JARVIS_QUANT` | `4bit` | Quantisation: `4bit` / `8bit` / `none` | | `JARVIS_MEMORY_DIR` | `./data/memory` | Where SQLite DB is stored | | `JARVIS_TTS_VOICE` | `en-US-GuyNeural` | Edge-TTS voice name | | `JARVIS_THINKING` | `true` | Enable background thinking engine | Set in HuggingFace Space **Settings โ†’ Variables & Secrets** or in a `.env` file locally. --- ## ๐Ÿ’พ RAM Requirements | Model | Quant | RAM | |---|---|---| | Phi-3-mini-4k-instruct (3.8B) | 4-bit | ~3โ€“4 GB | | Phi-3-mini-4k-instruct (3.8B) | fp16 | ~7.6 GB | | Mistral-7B-Instruct-v0.2 | 4-bit | ~4โ€“5 GB | | Mistral-7B-Instruct-v0.2 | fp16 | ~14 GB | **Recommended for 16 GB RAM:** Phi-3-mini 4-bit (fast) or Mistral-7B 4-bit (deeper reasoning). --- ## ๐Ÿ—‚๏ธ Project Structure ``` app.py โ€” Gradio UI + entry point brain.py โ€” HuggingFace model inference (lazy-loaded) memory.py โ€” SQLite facts + conversation history thinking.py โ€” Background anticipation engine voice_tts.py โ€” Edge-TTS text-to-speech config.py โ€” All settings via env vars requirements.txt README.md โ€” This file (HuggingFace model card) ``` --- ## ๐Ÿค Credits Built on top of: - [Microsoft Phi-3](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct) - [HuggingFace Transformers](https://github.com/huggingface/transformers) - [Gradio](https://gradio.app) - [Edge-TTS](https://github.com/rany2/edge-tts) - Original JARVIS project โ€” OpenJarvis architecture inspiration