Spaces:
Running
Running
Remove QUICK_START.md and reorganize documentation structure; add detailed deployment guide for Hugging Face Spaces and performance optimization documentation for agent mode.
7002c4d MeeTARA Hugging Face Spaces Deployment Guide
Quick Start β
Option 1: Connect GitHub Repo (Recommended)
Push to GitHub (if not already):
git add . git commit -m "Add HF Space deployment files" git pushCreate Space on HF:
- Go to https://huggingface.co/spaces
- Click "Create new Space"
- Select "Gradio" SDK
- Choose "Connect to existing repo"
- Select your GitHub repo:
your-username/meetara - Click "Create Space"
Done! HF will:
- Install dependencies automatically
- Run
app.py - Download models from
meetara-labrepos on first use
Option 2: Create Separate Space on HF
Create Space:
- Go to https://huggingface.co/spaces
- Click "Create new Space"
- Name:
meetara-lab/meetara-space(or your choice) - SDK: Gradio
- Create
Clone and Copy Files:
# Clone the Space repo git clone https://huggingface.co/spaces/meetara-lab/meetara-space cd meetara-space # Copy files from your repo cp -r /path/to/meetara/* . # Commit and push git add . git commit -m "Initial MeeTARA Space deployment" git push
Files Structure
meetara/
βββ app.py # Main Gradio application
βββ download_models.py # Model downloader from HF Hub
βββ requirements.txt # Python dependencies
βββ README.md # Space documentation (shown on HF)
βββ core/ # Core model/agent logic
βββ config/ # Configuration files
βββ docs/ # Documentation
What Gets Deployed
- β
Gradio web interface (
app.py) - β
Model downloader from HF Hub (
download_models.py) - β
Dependencies (
requirements.txt) - β
Space documentation (
README.md)
Models
Models are automatically downloaded from your HF repos:
meetara-lab/meetara-qwen3-4b-instruct-ggufmeetara-lab/meetara-qwen3-4b-thinking-ggufmeetara-lab/meetara-qwen3-8b-ggufmeetara-lab/meetara-qwen3-1.7b-gguf
First Run
- Space builds automatically (takes 2-5 minutes)
- Click "Initialize" button in the UI
- Models download on first initialization (may take 5-10 minutes)
- Start chatting!
Resource Considerations
Free Tier Limits
- CPU: 2 vCPU
- RAM: 16GB
- Storage: 50GB
- Timeout: 60 seconds per request
Recommendations
- Start with 4B Instruct model only (2.3GB) for faster startup
- Use lazy loading - only load models when needed
- Optimize context size - reduce
n_ctxin config for faster inference - Consider CPU-only - disable GPU layers to save memory
Customization
Modify Model Selection
Edit download_models.py to change which models are downloaded.
Adjust Performance
Edit config/meetara_lab_config.json to optimize for Spaces:
- Reduce
n_ctx(context size) - Reduce
n_threads(CPU threads) - Reduce
max_tokens(response length)
Change UI
Edit app.py to customize the Gradio interface (themes, layout, features).
Troubleshooting
Models Not Downloading
- Check HF token is set (usually automatic in Spaces)
- Verify repo IDs are correct in
download_models.py - Check Space logs for download errors
Import Errors
- Ensure all files from
core/andconfig/are accessible - Check Python path in
app.py - Verify
requirements.txthas all dependencies
Out of Memory
- Use smaller models (1.7B instead of 4B/8B)
- Reduce context size in config
- Enable model offloading (
offload_kqv=True)
Slow Startup
- Pre-download models (use HF's persistent storage)
- Reduce number of models loaded
- Optimize initialization code
Testing Locally
Before deploying, test locally:
cd meetara
pip install -r requirements.txt
python app.py
Visit http://localhost:7860 to test.
Updating the Space
After making changes:
- Commit changes to GitHub (if using Option 1)
- HF Spaces auto-rebuilds on push
- Or manually rebuild in Space settings
Support
For issues:
- Check Space logs in HF dashboard
- Review GitHub issues: https://github.com/your-username/meetara/issues
- HF Spaces docs: https://huggingface.co/docs/hub/spaces