Spaces:
Sleeping
Sleeping
| title: IR・ESG RAG Bot (OpenAI, 8 languages) — Docker | |
| emoji: 📊 | |
| colorFrom: yellow | |
| colorTo: blue | |
| sdk: docker | |
| app_port: 7860 | |
| pinned: false | |
| # IR・ESG RAG Bot(Docker / FastAPI + Gradio) | |
| - UI: `/`(Gradio) | |
| - API: `POST /api/answer`(JSON: `{ "question":"...", "lang":"ja" }`) | |
| - Rebuild Index: `POST /api/rebuild`(ingest.py 実行) | |
| - Health: `GET /health` | |
| ## 使い方(Spaces) | |
| 1. このリポジトリをアップロード(このREADMEを含む) | |
| 2. **Settings → Secrets** に `OPENAI_API_KEY` を登録 | |
| 3. `data/pdf/` にPDFを追加(UIからはアップロードしません) | |
| 4. Space を再ビルド | |
| 5. UIで「インデックス再構築」 or `POST /api/rebuild` を叩く → 質問 | |
| ## ローカル起動(任意) | |
| ```bash | |
| docker build -t ir-esg-rag . | |
| docker run -e OPENAI_API_KEY=sk-... -p 7860:7860 -v $(pwd)/data:/app/data ir-esg-rag | |
| # ブラウザ: http://localhost:7860 | |