copilot-swe-agent[bot]
IngSeb0
feat: add complete Next.js + Tailwind CSS frontend for ReliefLensAI
088402d unverified Download frontend/lib/api.ts from lablab-ai-amd-developer-hackathon/ReliefLensDemo: direct link, hf CLI and curl.
- Browser
- Download file 921 Bytes
-
https://huggingface.co/spaces/lablab-ai-amd-developer-hackathon/ReliefLensDemo/resolve/main/frontend/lib/api.ts
- Command line
-
hf download hf://spaces/lablab-ai-amd-developer-hackathon/ReliefLensDemo/frontend/lib/api.ts
-
curl -L -o api.ts https://huggingface.co/spaces/lablab-ai-amd-developer-hackathon/ReliefLensDemo/resolve/main/frontend/lib/api.ts
921 Bytes
| import axios from "axios"; | |
| const BASE_URL = process.env.NEXT_PUBLIC_API_URL || "http://localhost:8080"; | |
| export const api = { | |
| getHealth: () => axios.get(`${BASE_URL}/health`), | |
| runDemo: () => axios.post(`${BASE_URL}/api/demo/run`), | |
| getDemoScenario: () => axios.get(`${BASE_URL}/api/demo/scenario`), | |
| getIncidents: (sessionId?: string) => | |
| axios.get(`${BASE_URL}/api/incidents`, { | |
| params: sessionId ? { session_id: sessionId } : {}, | |
| }), | |
| getIncident: (id: string) => axios.get(`${BASE_URL}/api/incidents/${id}`), | |
| approveIncident: (id: string) => | |
| axios.patch(`${BASE_URL}/api/incidents/${id}`, { human_approved: true }), | |
| generateDispatch: (id: string) => | |
| axios.post(`${BASE_URL}/api/incidents/${id}/dispatch-message`), | |
| getAMDMetrics: () => axios.get(`${BASE_URL}/api/amd/performance`), | |
| getCrisisRoom: (sessionId: string) => | |
| axios.get(`${BASE_URL}/api/crisis-room/${sessionId}`), | |
| }; | |