|
|
--- |
|
|
title: 🐘 Laos Natural Science Chatbot |
|
|
emoji: 💬 |
|
|
colorFrom: yellow |
|
|
colorTo: purple |
|
|
sdk: gradio |
|
|
sdk_version: 6.1.0 |
|
|
app_file: app.py |
|
|
pinned: false |
|
|
hf_oauth: true |
|
|
hf_oauth_scopes: |
|
|
- inference-api |
|
|
--- |
|
|
|
|
|
|
|
|
# 🐘 Laos Natural Science Chatbot (ວິທະຍາສາດ ທຳມະຊາດ ມ.1-ມ.4) |
|
|
|
|
|
Chatbot ຕົວນີ້ອອກແບບສໍາລັບນັກຮຽນຊັ້ນ ມ.1-ມ.4 ໃນວິຊາວິທະຍາສາດທຳມະຊາດພາສາລາວ |
|
|
ໃຊ້ SeaLLM + JSONL ຂໍ້ມູນຈາກຕໍາລາປະຫວັດສາດ ແລະ Q&A ທີ່ຄູເພີ່ມເອງ (Teacher Panel) |
|
|
ພັດທະນາດ້ວຍ [Gradio](https://gradio.app) ແລະເຮັດວຽກໃນ Hugging Face Spaces. |
|
|
|
|
|
--- |
|
|
|
|
|
## ✨ Features |
|
|
|
|
|
- 👩🎓 **Student Chat** |
|
|
- ນັກຮຽນຖາມຄໍາຖາມວິທະຍາສາດທຳມະຊາດເປັນພາສາລາວ |
|
|
- ຄໍາຕອບສັ້ນໆ 2–3 ປະໂຫຍກ ເຂົ້າໃຈງ່າຍ ເໝາະກັບນັກຮຽນ ມ.1-ມ.4 |
|
|
- ອີງຈາກຂໍ້ມູນໃນ JSONL ຕໍາລາ + Q&A ທີ່ຄູຕັ້ງໄວ້ |
|
|
|
|
|
- 👩🏫 **Teacher Panel** |
|
|
- ເພີ່ມ / ແກ້ໄຂ / ລຶບ Q&A ມື (บັນທຶກໃນ `data/manual_qa.jsonl`) |
|
|
- ຄໍາຕອບໃໝ່ຖືກນໍາໃຊ້ທັນທີໃນ Student Chat |
|
|
- ເບິ່ງຕາຕະລາງ Q&A ທັງໝົດ ແລະເລືອກແຖວເພື່ອແກ້ໄຂ |
|
|
|
|
|
- 🧠 **RAG + Embeddings** |
|
|
- ດຶງຂໍ້ມູນຈາກ JSONL ຕໍາລາດ້ວຍ sentence-transformers (embedding-based retrieval) |
|
|
- ເລືອກຊິ້ນຂໍ້ມູນ (entries) ທີ່ໃກ້ຄຽງກັບຄໍາຖາມທີ່ສຸດ |
|
|
- ໃຊ້ SeaLLM ຕອບຄໍາຖາມໂດຍອີງຈາກ context ເຫຼົ່ານີ້ |
|
|
|
|
|
--- |
|
|
|
|
|
## 📁 Project structure |
|
|
|
|
|
```text |
|
|
laos-history-chatbot/ |
|
|
├── app.py # Gradio UI (Student Chat + Teacher Panel) |
|
|
├── model_utils.py # SeaLLM, RAG, embeddings, chatbot logic |
|
|
├── loader.py # Load textbook JSONL + manual_qa.jsonl |
|
|
├── qa_store.py # In-memory storage & normalize_question |
|
|
├── teacher_panel.py # Teacher Panel actions (save/update/delete/select) |
|
|
├── data/ |
|
|
│ ├── 1_Year_U_1.jsonl # Curriculum (textbook) data |
|
|
... (Still have more jsonl that I have to add) |
|
|
│ └── manual_qa.jsonl # Manual Q&A from teachers |
|
|
├── requirements.txt # Python dependencies |
|
|
└── README.md # This file |
|
|
|