Jarvis / UPLOAD_GUIDE.txt
NeuMax's picture
Upload 11 files
6645e8f verified
Raw History Blame Contribute Delete
8.54 kB
══════════════════════════════════════════════════════════════
JARVIS β†’ HUGGINGFACE UPLOAD GUIDE
16 GB RAM Β· Local inference Β· No GPU required
══════════════════════════════════════════════════════════════
WHAT'S IN THIS FOLDER (hf_jarvis/)
────────────────────────────────────────────────────────────
app.py β†’ Gradio UI (entry point for HF Spaces)
brain.py β†’ HuggingFace Transformers inference engine
memory.py β†’ SQLite memory (facts + conversation history)
thinking.py β†’ Background anticipation engine
voice_tts.py β†’ Edge-TTS voice output
config.py β†’ All settings via environment variables
requirements.txt→ All pip packages needed
README.md β†’ HuggingFace model card (auto-displayed)
.env.example β†’ Local dev environment template
.gitignore β†’ Keeps your DB and secrets out of git
════════════════════════════════════════════════════════════
STEP 1: CREATE A HUGGINGFACE ACCOUNT / LOG IN
════════════════════════════════════════════════════════════
Go to: https://huggingface.co
Sign up (free) or log in.
════════════════════════════════════════════════════════════
STEP 2: CREATE A NEW SPACE
════════════════════════════════════════════════════════════
1. Click your profile icon β†’ New Space
2. Space name: jarvis (or any name you like)
3. License: MIT
4. SDK: Gradio ← IMPORTANT: select Gradio
5. Hardware: CPU (upgraded) ← free tier is fine for 3.8B 4-bit
For Mistral-7B choose "CPU upgrade" or "A10G small" if available
6. Visibility: Private (or Public β€” your choice)
7. Click: Create Space
════════════════════════════════════════════════════════════
STEP 3: UPLOAD FILES
════════════════════════════════════════════════════════════
METHOD A β€” Drag-and-drop in browser (easiest)
──────────────────────────────────────────────
1. Open your Space page β†’ click "Files" tab
2. Click "Add file" β†’ "Upload files"
3. Select ALL files from this folder:
app.py
brain.py
memory.py
thinking.py
voice_tts.py
config.py
requirements.txt
README.md
.env.example
.gitignore
4. Click "Commit changes to main"
5. HuggingFace will install requirements.txt and launch app.py
automatically. Wait ~2-5 minutes for the build to finish.
METHOD B β€” Git push (recommended for updates)
───────────────────────────────────────────────
Run in PowerShell from the hf_jarvis\ folder:
git init
git remote add origin https://huggingface.co/spaces/<YOUR_USERNAME>/jarvis
git add .
git commit -m "Initial JARVIS upload"
git push origin main
(You may need: git lfs install if you ever add large model files)
════════════════════════════════════════════════════════════
STEP 4: SET ENVIRONMENT VARIABLES (optional but recommended)
════════════════════════════════════════════════════════════
In your Space page β†’ Settings tab β†’ Variables & Secrets
Add these if you want to customize:
JARVIS_MODEL = microsoft/Phi-3-mini-4k-instruct (default)
JARVIS_QUANT = 4bit (default)
JARVIS_THINKING = true
Leave blank to use the safe defaults already in config.py.
════════════════════════════════════════════════════════════
STEP 5: WAIT FOR BUILD & OPEN JARVIS
════════════════════════════════════════════════════════════
HuggingFace will show build logs. When it says "Running",
your JARVIS is live at:
https://huggingface.co/spaces/<YOUR_USERNAME>/jarvis
First response takes ~30-90 seconds (model loading).
Every subsequent message is fast.
════════════════════════════════════════════════════════════
WHAT JARVIS CAN DO ON HUGGINGFACE
════════════════════════════════════════════════════════════
βœ… Chat with 3.8B / 7B local model β€” no external API costs
βœ… Voice replies (Edge-TTS, Microsoft GuyNeural voice)
βœ… Remember facts: type "remember name is Tony"
βœ… Check status: type "status"
βœ… See predictions: type "anticipate"
βœ… Persistent memory across sessions (SQLite DB, local to the Space)
βœ… Runs on 16 GB RAM β€” Phi-3-mini 4-bit uses only β‰ˆ3-4 GB
════════════════════════════════════════════════════════════
RAM & MODEL OPTIONS
════════════════════════════════════════════════════════════
Your 16 GB gives you a LOT of headroom:
Model β”‚ Quant β”‚ RAM used
───────────────────────────────────┼───────┼──────────
Phi-3-mini-4k-instruct (3.8B) β”‚ 4-bit β”‚ ~3-4 GB ← default (fast)
Phi-3-mini-4k-instruct (3.8B) β”‚ fp16 β”‚ ~7.6 GB
Mistral-7B-Instruct-v0.2 (7B) β”‚ 4-bit β”‚ ~4-5 GB ← deep reasoning
Mistral-7B-Instruct-v0.2 (7B) β”‚ fp16 β”‚ ~14 GB ← max quality
To switch: set JARVIS_MODEL in Space Settings.
════════════════════════════════════════════════════════════
TROUBLESHOOTING
════════════════════════════════════════════════════════════
"Model loading..." forever
β†’ First load downloads from HF Hub. Wait 3-5 minutes.
The model (~2-7 GB) downloads once and is cached.
"bitsandbytes not available"
β†’ 4-bit quant needs a recent version. Set JARVIS_QUANT=none
if bitsandbytes fails (fp32, uses more RAM but works).
Out of memory
β†’ Set JARVIS_QUANT=4bit (default) to reduce RAM to ~3-4 GB.
Voice not working
β†’ edge-tts needs internet. On fully offline HF Spaces,
TTS falls back silently to text-only β€” chat still works.
══════════════════════════════════════════════════════════════
SIR β€” YOUR JARVIS IS READY FOR THE WORLD
══════════════════════════════════════════════════════════════