Spaces:
Runtime error
Runtime error
|
Download README.md from Corin1998/IR_ESG_RAG_Bot: direct link, hf CLI and curl.
- Browser
- Download file 1.15 kB
-
https://huggingface.co/spaces/Corin1998/IR_ESG_RAG_Bot/resolve/main/README.md
- Command line
-
hf download hf://spaces/Corin1998/IR_ESG_RAG_Bot/README.md
-
curl -L -o README.md https://huggingface.co/spaces/Corin1998/IR_ESG_RAG_Bot/resolve/main/README.md
1.15 kB
A newer version of the Gradio SDK is available: 6.33.0
metadata
title: IR・ESG RAG Bot (OpenAI, 8 languages)
emoji: 📊
colorFrom: yellow
colorTo: blue
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
python_version: '3.10'
クイックスタート
data/pdf/にIR/ESG PDFを配置pip install -r requirements.txtpython ingest.py→data/index/生成export OPENAI_API_KEY=...(必要に応じてOPENAI_BASE_URL)python app.py→ Gradio UI //api/answer
埋め込みサンプル
<script>
async function askRag(question, lang="ja"){
const r = await fetch("https://<your-host>/api/answer",{
method:"POST", headers:{"Content-Type":"application/json"},
body: JSON.stringify({question, lang})
});
const data = await r.json();
console.log(data.text, data.citations);
}
</script>
モデル推奨
- 生成:
gpt-4 - 埋め込み:
text-embedding-3-large
運用Tips
- PDF直リンク +
#page=<n>をmeta.jsonlに保持すれば、根拠クリックで該当ページに飛べます。 - 年度更新はPDF差替え→
python ingest.py。CI/CDで自動化を推奨。 - ログには個人情報を含めない。