Spaces:
Running
Running
Delete QUICK_REFERENCE.md
Browse files- QUICK_REFERENCE.md +0 -68
QUICK_REFERENCE.md
DELETED
|
@@ -1,68 +0,0 @@
|
|
| 1 |
-
# Quick Reference - Qwen3 Docker Deployment
|
| 2 |
-
|
| 3 |
-
## π Deploy to Hugging Face Spaces
|
| 4 |
-
|
| 5 |
-
```bash
|
| 6 |
-
# 1. Login to Hugging Face
|
| 7 |
-
huggingface-cli login --token YOUR_TOKEN
|
| 8 |
-
|
| 9 |
-
# 2. Deploy using script
|
| 10 |
-
./deploy-to-hf.sh
|
| 11 |
-
|
| 12 |
-
# 3. Or manually upload files
|
| 13 |
-
huggingface-cli upload YOUR_USERNAME/YOUR_SPACE_NAME ./app.py app.py
|
| 14 |
-
huggingface-cli upload YOUR_USERNAME/YOUR_SPACE_NAME ./Dockerfile Dockerfile
|
| 15 |
-
huggingface-cli upload YOUR_USERNAME/YOUR_SPACE_NAME ./requirements.txt requirements.txt
|
| 16 |
-
huggingface-cli upload YOUR_USERNAME/YOUR_SPACE_NAME ./README.md README.md
|
| 17 |
-
```
|
| 18 |
-
|
| 19 |
-
## π§ Update PansGPT App
|
| 20 |
-
|
| 21 |
-
1. **Update .env file:**
|
| 22 |
-
```env
|
| 23 |
-
QWEN_API_URL=https://your-username-your-space-name.hf.space/api/predict
|
| 24 |
-
```
|
| 25 |
-
|
| 26 |
-
2. **Replace embedding service:**
|
| 27 |
-
- Copy `qwen-embedding-service-docker.ts` to `src/lib/`
|
| 28 |
-
- Update imports in your app
|
| 29 |
-
|
| 30 |
-
3. **Test the integration:**
|
| 31 |
-
```bash
|
| 32 |
-
node test-pansgpt-api.js
|
| 33 |
-
```
|
| 34 |
-
|
| 35 |
-
## π API Endpoints
|
| 36 |
-
|
| 37 |
-
- **Main API**: `POST /api/predict`
|
| 38 |
-
- **Health Check**: `GET /health`
|
| 39 |
-
- **Web Interface**: Your space URL
|
| 40 |
-
|
| 41 |
-
## π― Model Info
|
| 42 |
-
|
| 43 |
-
- **Model**: Qwen3-Embedding-0.6B
|
| 44 |
-
- **Dimensions**: 1024
|
| 45 |
-
- **Languages**: 100+
|
| 46 |
-
- **Context**: 32K tokens
|
| 47 |
-
|
| 48 |
-
## π Quick Test
|
| 49 |
-
|
| 50 |
-
```bash
|
| 51 |
-
# Test health
|
| 52 |
-
curl https://your-space.hf.space/health
|
| 53 |
-
|
| 54 |
-
# Test embedding
|
| 55 |
-
curl -X POST "https://your-space.hf.space/api/predict" \
|
| 56 |
-
-H "Content-Type: application/json" \
|
| 57 |
-
-d '{"data": ["Hello world"]}'
|
| 58 |
-
```
|
| 59 |
-
|
| 60 |
-
## π Files in This Folder
|
| 61 |
-
|
| 62 |
-
- `app.py` - Main FastAPI application
|
| 63 |
-
- `Dockerfile` - Docker configuration
|
| 64 |
-
- `requirements.txt` - Python dependencies
|
| 65 |
-
- `qwen-embedding-service-docker.ts` - PansGPT integration
|
| 66 |
-
- `test-pansgpt-api.js` - Test script
|
| 67 |
-
- `deploy-to-hf.sh` - Deployment script
|
| 68 |
-
- `README.md` - Full documentation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|