Spaces:
Sleeping
Sleeping
File size: 1,754 Bytes
ad5d213 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | # β‘ Quick Start Guide - Hugging Face Deployment
## π― **5-Minute Setup**
### **Step 1: Create HF Spaces (2 min)**
1. Go to **https://huggingface.co/spaces**
2. Create TWO spaces:
- `docling-api`
- `docstrange-api`
3. Use **Docker SDK** for both
4. Set to **Public** (free) or **Private**
### **Step 2: Upload Files (1 min)**
For EACH space:
1. Upload `app.py` from corresponding folder
2. Upload `requirements.txt` from corresponding folder
3. Wait for deployment (2-3 min)
### **Step 3: Get Your URLs**
After deployment:
- Docling: `https://YOUR_USERNAME-docling-api.hf.space`
- DocStrange: `https://YOUR_USERNAME-docstrange-api.hf.space`
### **Step 4: Connect to DataSync (1 min)**
1. Open **http://localhost:5000**
2. Go to **Import Data β DocStrange tab**
3. Select engine:
- `π¬ Docling Hugging Face` OR
- `π§ͺ DocStrange Hugging Face`
4. Paste your HF URL
5. Upload PDF and extract!
---
## π§ͺ **Test Your APIs**
```bash
# Test both APIs
cd huggingface_deploy\test-scripts
python test_docling.py https://YOUR_USERNAME-docling-api.hf.space
python test_docstrange.py https://YOUR_USERNAME-docstrange-api.hf.space
```
---
## β
**You're Done!**
Both APIs are now integrated with DataSync and ready to extract documents!
---
## π **Troubleshooting**
| Problem | Solution |
|---------|----------|
| Space not deploying | Check Docker logs in HF Space settings |
| API returns 500 | Verify requirements.txt uploaded |
| Timeout errors | PDF too large - try smaller file |
| Not working in DataSync | Check URL format (no trailing slash) |
---
## π **Next Steps**
- Try different engines for comparison
- Map extracted columns to ERPNext
- Download CSV/JSON of extracted data
**Happy extracting!** π
|