Spaces:
Runtime error
Runtime error
Commit ·
ea4f0ce
1
Parent(s): 20eeda5
Prepare repo for public visibility
Browse files- DATA_NOTICE.md +18 -0
- LICENSE +21 -0
- README.md +39 -3
- frontend/config.js +1 -1
DATA_NOTICE.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Data Notice
|
| 2 |
+
|
| 3 |
+
The `/data` directory contains derived artifacts created from data and publication materials sourced from BPS.
|
| 4 |
+
|
| 5 |
+
## Important
|
| 6 |
+
|
| 7 |
+
- The original rights to BPS content remain with BPS and/or the Government of Indonesia, subject to the applicable BPS terms and policies.
|
| 8 |
+
- This repository does **not** grant a new standalone license over BPS source data.
|
| 9 |
+
- Any reuse of the data in `/data` should follow the applicable BPS terms of use and attribution requirements.
|
| 10 |
+
|
| 11 |
+
## References
|
| 12 |
+
|
| 13 |
+
- BPS Terms of Use: https://www.bps.go.id/id/term-of-use
|
| 14 |
+
- BPS Dissemination Policy / Services: https://ppid.bps.go.id/app/konten/Layanan-BPS.html
|
| 15 |
+
|
| 16 |
+
## Attribution
|
| 17 |
+
|
| 18 |
+
If you quote or reuse BPS content, provide proper attribution to BPS and link back to the original source where possible.
|
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2026
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
README.md
CHANGED
|
@@ -1,11 +1,47 @@
|
|
| 1 |
---
|
| 2 |
title: Bps Rag
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: green
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
-
short_description:
|
| 9 |
---
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: Bps Rag
|
| 3 |
+
emoji: turtle
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: green
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
+
short_description: RAG assistant for BPS Semarang publications
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# BPS RAG
|
| 12 |
+
|
| 13 |
+
RAG assistant for BPS Kota Semarang publications.
|
| 14 |
+
|
| 15 |
+
## Structure
|
| 16 |
+
|
| 17 |
+
- `frontend/`: static frontend for Netlify or other static hosting
|
| 18 |
+
- `backend/`: FastAPI application and retrieval logic
|
| 19 |
+
- `data/`: local FAISS index and derived data files used by the backend
|
| 20 |
+
|
| 21 |
+
## Local Run
|
| 22 |
+
|
| 23 |
+
Set your Groq API key first:
|
| 24 |
+
|
| 25 |
+
```powershell
|
| 26 |
+
$env:GROQ_API_KEY="YOUR_GROQ_API_KEY"
|
| 27 |
+
python app.py
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
Then open:
|
| 31 |
+
|
| 32 |
+
```text
|
| 33 |
+
http://127.0.0.1:8000
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
## Deploy
|
| 37 |
+
|
| 38 |
+
- `frontend/` can be published to Netlify
|
| 39 |
+
- `backend/` and `data/` can be deployed with a Docker-compatible host such as Hugging Face Spaces
|
| 40 |
+
|
| 41 |
+
Set production API URL in `frontend/config.js` when deploying the frontend separately.
|
| 42 |
+
|
| 43 |
+
## Data Notice
|
| 44 |
+
|
| 45 |
+
The `/data` directory contains derived artifacts built from BPS sources.
|
| 46 |
+
|
| 47 |
+
This repository does **not** grant a separate license over BPS source data. See [DATA_NOTICE.md](DATA_NOTICE.md) for usage and attribution notes.
|
frontend/config.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
window.APP_CONFIG = {
|
| 2 |
-
API_BASE_URL: ""
|
| 3 |
};
|
|
|
|
| 1 |
window.APP_CONFIG = {
|
| 2 |
+
API_BASE_URL: "https://galihkjaya-bps-rag.hf.space"
|
| 3 |
};
|