madriClaro / QUICKSTART.md
Ruben
Integrate Aclarador with Groq API for clarity analysis
28aa7d9
# πŸš€ Quick Start - Deploy in 30 Minutes!
## βœ… Complete Checklist
### Prerequisites (5 minutes)
- [ ] Hugging Face account created (https://huggingface.co - FREE!)
- [ ] Git installed on your computer
- [ ] Your Aclarador code accessible (or use placeholder)
### Deployment (25 minutes)
#### 1. Create Hugging Face Space (3 minutes)
- [ ] Go to https://huggingface.co/new-space
- [ ] Name: `madrid-content-analyzer`
- [ ] SDK: **Gradio**
- [ ] Click "Create Space"
#### 2. Clone Your Space (2 minutes)
```bash
# Get your access token from https://huggingface.co/settings/tokens
# Clone
git clone https://huggingface.co/spaces/YOUR_USERNAME/madrid-content-analyzer
cd madrid-content-analyzer
```
#### 3. Copy Project Files (5 minutes)
```bash
# Copy everything from this folder to your cloned space
# From: /mnt/user-data/outputs/madrid-analyzer-hf/
# To: your madrid-content-analyzer/ folder
# All these files:
cp -r /path/to/madrid-analyzer-hf/* .
```
#### 4. Add Your Aclarador (10 minutes)
**Option A: Have Aclarador ready**
```bash
cd analyzers/aclarador
git clone https://github.com/YOUR_USERNAME/aclarador.git .
# Or copy local files
cp -r /path/to/aclarador/* .
# Update ../analyzer_wrapper.py (see ACLARADOR_INTEGRATION.md)
```
**Option B: Use placeholder (deploy now, add Aclarador later)**
```bash
# The placeholder is already in analyzer_wrapper.py
# Skip to step 5!
```
#### 5. Deploy! (2 minutes)
```bash
# Add all files
git add .
# Commit
git commit -m "Deploy Madrid Content Analyzer"
# Push (will ask for your HF username and token)
git push
# βœ… Space will build automatically (2-5 minutes)
```
#### 6. Verify (3 minutes)
- [ ] Go to your Space URL
- [ ] Wait for "Running" status
- [ ] Test Dashboard tab
- [ ] Click "Trigger Manual Fetch" in Settings
- [ ] Wait 1-2 minutes
- [ ] Refresh Dashboard - you should see data!
---
## πŸŽ‰ You're Live!
Your Space is at:
```
https://huggingface.co/spaces/YOUR_USERNAME/madrid-content-analyzer
```
Public URL:
```
https://YOUR_USERNAME-madrid-content-analyzer.hf.space
```
---
## πŸ“‹ What's Next?
### Immediate
- [x] App deployed and running
- [ ] Verify automatic fetches work (every 6 hours)
- [ ] Check data persists
- [ ] Share your Space URL!
### Soon
- [ ] If using placeholder: Add real Aclarador
- [ ] Customize fetch frequency in app.py (line 35)
- [ ] Adjust UI in app.py
- [ ] Add more data sources
### Later
- [ ] Make private if desired (Settings β†’ Visibility)
- [ ] Add secrets if needed (Settings β†’ Repository secrets)
- [ ] Monitor database size (Settings tab in app)
- [ ] Export and analyze data
---
## πŸ†˜ Troubleshooting
### Space won't start
**Check**: Space logs (App files β†’ Logs)
**Common fix**: Missing dependency in requirements.txt
### No data showing
**Check**: Trigger manual fetch (Settings tab)
**Wait**: 1-2 minutes for fetch to complete
### Import errors
**Check**: Aclarador files are in analyzers/aclarador/
**Check**: __init__.py exists in aclarador folder
### Database errors
**Check**: /data/ directory is used (see config/database.py)
---
## πŸ“š Full Documentation
- **DEPLOYMENT_GUIDE.md** - Complete step-by-step guide
- **ACLARADOR_INTEGRATION.md** - Detailed Aclarador setup
- **README.md** - Space description
- **HUGGING_FACE_READY.md** - Overview and benefits
---
## πŸ’° Cost
**$0/month forever!** πŸŽ‰
No credit card required. 16GB storage. Always on.
---
**Ready? Let's deploy! πŸš€**