Spaces:
Running
Running
Update README.md - add FastAPI REST endpoints + Gemini AI
Browse files
README.md
CHANGED
|
@@ -7,32 +7,39 @@ sdk: docker
|
|
| 7 |
app_file: app.py
|
| 8 |
pinned: false
|
| 9 |
license: mit
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
# CyberForge AI - ML Training Platform
|
| 13 |
|
| 14 |
-
|
| 15 |
|
| 16 |
-
##
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
##
|
| 24 |
|
| 25 |
-
|
| 26 |
-
|---|----------|---------|
|
| 27 |
-
| 00 | environment_setup | System validation |
|
| 28 |
-
| 01 | data_acquisition | Data collection |
|
| 29 |
-
| 02 | feature_engineering | Feature extraction |
|
| 30 |
-
| 03 | model_training | Train models |
|
| 31 |
-
| 04 | agent_intelligence | AI reasoning |
|
| 32 |
-
| 05 | model_validation | Testing |
|
| 33 |
-
| 06 | backend_integration | API packaging |
|
| 34 |
-
| 07 | deployment_artifacts | Deployment |
|
| 35 |
|
| 36 |
-
|
|
|
|
|
|
|
| 37 |
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
app_file: app.py
|
| 8 |
pinned: false
|
| 9 |
license: mit
|
| 10 |
+
short_description: CyberForge AI - ML Training & Inference Platform
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# 🔐 CyberForge AI - ML Training & Inference Platform
|
| 14 |
|
| 15 |
+
Gradio UI for notebook execution, model training, and inference + FastAPI REST API for the Heroku backend.
|
| 16 |
|
| 17 |
+
## REST API Endpoints (for backend mlService.js)
|
| 18 |
|
| 19 |
+
| Endpoint | Method | Description |
|
| 20 |
+
|----------|--------|-------------|
|
| 21 |
+
| `/health` | GET | Health check |
|
| 22 |
+
| `/analyze` | POST | AI chat (Gemini) |
|
| 23 |
+
| `/analyze-url` | POST | URL threat analysis |
|
| 24 |
+
| `/scan-threats` | POST | Threat scanning |
|
| 25 |
+
| `/api/insights/generate` | POST | AI insights |
|
| 26 |
+
| `/api/models/predict` | POST | ML model prediction |
|
| 27 |
+
| `/models` | GET | List available models |
|
| 28 |
+
| `/api/analysis/network` | POST | Network traffic analysis |
|
| 29 |
+
| `/api/ai/execute-task` | POST | AI task execution |
|
| 30 |
|
| 31 |
+
## Environment Secrets
|
| 32 |
|
| 33 |
+
Set these in your Space settings → Secrets:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
+
- `GEMINI_API_KEY` - Google Gemini API key
|
| 36 |
+
- `HF_TOKEN` - HuggingFace token (for model downloads)
|
| 37 |
+
- `HF_MODEL_REPO` - Model repository (default: `Che237/cyberforge-models`)
|
| 38 |
|
| 39 |
+
## Backend Integration
|
| 40 |
+
|
| 41 |
+
Your Heroku backend connects to this Space:
|
| 42 |
+
|
| 43 |
+
```bash
|
| 44 |
+
heroku config:set AI_SERVICE_URL=https://che237-cyberforge.hf.space -a cyberforge
|
| 45 |
+
```
|