Spaces:
Runtime error
Runtime error
Fix: Update README.md - models load on demand
Browse files
README.md
CHANGED
|
@@ -8,50 +8,23 @@ pinned: false
|
|
| 8 |
license: mit
|
| 9 |
---
|
| 10 |
|
| 11 |
-
# NEED AI API
|
| 12 |
|
| 13 |
-
Production
|
| 14 |
|
| 15 |
-
## π
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
All endpoints return detailed error messages if models are unavailable.
|
| 22 |
-
|
| 23 |
-
- GET `/health` - System health and model availability
|
| 24 |
-
- POST `/api/category` - Predict service category
|
| 25 |
-
- POST `/api/chat` - Answer support questions
|
| 26 |
-
- POST `/api/service` - Generate service descriptions
|
| 27 |
- POST `/api/search` - Semantic search
|
| 28 |
- POST `/api/moderate` - Content moderation
|
| 29 |
|
| 30 |
-
##
|
| 31 |
-
|
| 32 |
-
```python
|
| 33 |
-
import requests
|
| 34 |
-
|
| 35 |
-
# Check health
|
| 36 |
-
response = requests.get("https://yogami9-need-ai-api.hf.space/health")
|
| 37 |
-
print(response.json())
|
| 38 |
-
|
| 39 |
-
# Use API
|
| 40 |
-
response = requests.post(
|
| 41 |
-
"https://yogami9-need-ai-api.hf.space/api/category",
|
| 42 |
-
json={"query": "I need house cleaning"}
|
| 43 |
-
)
|
| 44 |
-
print(response.json())
|
| 45 |
-
```
|
| 46 |
-
|
| 47 |
-
## π§ Troubleshooting
|
| 48 |
|
| 49 |
-
|
| 50 |
-
1. Check models exist: https://huggingface.co/yogami9
|
| 51 |
-
2. Verify models are PUBLIC
|
| 52 |
-
3. Wait 2-3 minutes for first load
|
| 53 |
-
4. Check logs for specific errors
|
| 54 |
|
| 55 |
-
## π§
|
| 56 |
|
| 57 |
needserviceapp@gmail.com
|
|
|
|
| 8 |
license: mit
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# NEED AI API
|
| 12 |
|
| 13 |
+
Production API for NEED service marketplace AI.
|
| 14 |
|
| 15 |
+
## π Endpoints
|
| 16 |
|
| 17 |
+
- GET `/health` - Health check
|
| 18 |
+
- POST `/api/category` - Predict category
|
| 19 |
+
- POST `/api/chat` - Answer questions
|
| 20 |
+
- POST `/api/service` - Generate descriptions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
- POST `/api/search` - Semantic search
|
| 22 |
- POST `/api/moderate` - Content moderation
|
| 23 |
|
| 24 |
+
## π‘ Note
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
+
Models load on first request (30-60 seconds). Subsequent requests are fast!
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
+
## π§ Support
|
| 29 |
|
| 30 |
needserviceapp@gmail.com
|