Update README.md
Browse files
README.md
CHANGED
|
@@ -13,35 +13,42 @@ pinned: false
|
|
| 13 |
|
| 14 |
This Space hosts the **ARF v4 API** with an optional Gradio dashboard. It provides endpoints for risk assessment, decision history, and incident evaluation, as used by the [ARF frontend](https://arf-frontend-sandy.vercel.app).
|
| 15 |
|
|
|
|
|
|
|
| 16 |
## 🚀 Endpoints
|
| 17 |
|
|
|
|
|
|
|
| 18 |
| Method | Path | Description |
|
| 19 |
|--------|------|-------------|
|
| 20 |
-
| `GET` | `/health` | Health check |
|
| 21 |
| `GET` | `/api/v1/get_risk` | Current system risk (demo) |
|
| 22 |
| `GET` | `/api/v1/history` | Recent decisions |
|
| 23 |
| `POST` | `/api/v1/incidents/evaluate` | Evaluate an incident (placeholder) |
|
| 24 |
| `POST` | `/api/v1/feedback` | Record outcome of a decision |
|
| 25 |
|
| 26 |
-
Interactive API documentation is available at `/docs` (FastAPI Swagger UI).
|
| 27 |
-
|
| 28 |
## 🧪 Try It
|
| 29 |
|
| 30 |
-
|
| 31 |
-
[https://a-r-f-agentic-reliability-framework-api.hf.space/
|
| 32 |
-
|
| 33 |
-
Or use the Gradio dashboard (mounted at the root) for a visual demo.
|
| 34 |
|
| 35 |
## 🔧 Local Development
|
| 36 |
|
| 37 |
-
To run this Space locally:
|
| 38 |
|
| 39 |
```bash
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
pip install -r requirements.txt
|
| 41 |
-
|
| 42 |
```
|
| 43 |
|
| 44 |
-
The
|
| 45 |
|
| 46 |
📚 About ARF
|
| 47 |
------------
|
|
|
|
| 13 |
|
| 14 |
This Space hosts the **ARF v4 API** with an optional Gradio dashboard. It provides endpoints for risk assessment, decision history, and incident evaluation, as used by the [ARF frontend](https://arf-frontend-sandy.vercel.app).
|
| 15 |
|
| 16 |
+
The API is built with FastAPI and mounted under the `/api` subpath, while the Gradio dashboard is served at the root (`/`).
|
| 17 |
+
|
| 18 |
## 🚀 Endpoints
|
| 19 |
|
| 20 |
+
All API endpoints are prefixed with `/api`. Interactive documentation is available at `/api/docs`.
|
| 21 |
+
|
| 22 |
| Method | Path | Description |
|
| 23 |
|--------|------|-------------|
|
| 24 |
+
| `GET` | `/api/health` | Health check |
|
| 25 |
| `GET` | `/api/v1/get_risk` | Current system risk (demo) |
|
| 26 |
| `GET` | `/api/v1/history` | Recent decisions |
|
| 27 |
| `POST` | `/api/v1/incidents/evaluate` | Evaluate an incident (placeholder) |
|
| 28 |
| `POST` | `/api/v1/feedback` | Record outcome of a decision |
|
| 29 |
|
|
|
|
|
|
|
| 30 |
## 🧪 Try It
|
| 31 |
|
| 32 |
+
- **Swagger UI**: [https://a-r-f-agentic-reliability-framework-api.hf.space/api/docs](https://a-r-f-agentic-reliability-framework-api.hf.space/api/docs)
|
| 33 |
+
- **Gradio dashboard**: [https://a-r-f-agentic-reliability-framework-api.hf.space/](https://a-r-f-agentic-reliability-framework-api.hf.space/)
|
|
|
|
|
|
|
| 34 |
|
| 35 |
## 🔧 Local Development
|
| 36 |
|
| 37 |
+
To run this Space locally with Docker:
|
| 38 |
|
| 39 |
```bash
|
| 40 |
+
docker build -t arf-api .
|
| 41 |
+
docker run -p 7860:7860 arf-api
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
Or without Docker, using Python directly:
|
| 45 |
+
|
| 46 |
+
```python
|
| 47 |
pip install -r requirements.txt
|
| 48 |
+
uvicorn app:fastapi_app --reload --port 7860
|
| 49 |
```
|
| 50 |
|
| 51 |
+
The API will be available at http://localhost:7860/api and the Gradio UI at http://localhost:7860.
|
| 52 |
|
| 53 |
📚 About ARF
|
| 54 |
------------
|