Spaces:
Sleeping
Sleeping
File size: 2,494 Bytes
86f1108 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | # PROGRESS.md
Last Updated: 2026-05-28 05:20
Current Step: COMPLETE β
## Files
β
requirements.txt
β
.env (template)
β
rules/microba_rules.json
β
rules/logam_berat_rules.json
β
rules/cppob_rules.json
β
prompts/classify_prompt.txt
β
prompts/compliance_llm_prompt.txt
β
prompts/report_prompt.txt
β
data/regulations/ β 10 PDFs distributed across 4 category folders
β
src/__init__.py
β
src/ingest.py
β
src/extractor.py β FIXED: dot separator, multiline, TPC/Kapang dan Khamir
β
src/classifier.py β FIXED: DAIRY keywords, import re, gemini-2.0-flash
β
src/rule_engine.py
β
src/rag_query.py
β
src/llm_narrator.py β FIXED: project-root paths, gemini-2.0-flash
β
src/report_generator.py
β
src/app.py β FIXED: full dasar hukum display, MISSING handling, file_path
β
README.md
## Test Results
- [x] Ingest test: ChromaDB populated (923 chunks: 131+186+389+217)
- [x] Extractor test: BOTH colon format AND dot separator format pass β
- [x] Classifier test: 4/4 categories correct β
- [x] Rule engine test: 2 violations detected (ALT, Timbal_Pb) β
- [x] RAG query test: semantic search returns relevant results β
- [x] LLM narrator test: fallback narration works β
- [x] Report generator test: PDF generated β
- [x] App test: Gradio boots on http://127.0.0.1:7860 β
## Bug Fixes Applied (2026-05-28)
1. Extractor: Added flexible _SEP pattern for dot/colon/dash separators
2. Extractor: Added "Total Plate Count"/"TPC" aliases for ALT
3. Extractor: Handle "Kapang dan Khamir" combined format
4. Extractor: Handle "Kadar Timbal (Pb)" with dot separator
5. Extractor: Added _preprocess_text for multiline Key:\nValue format
6. Extractor: Added _extract_section for === SECTION === format
7. Extractor: Added "Tanggal Pengujian", "Produsen" to metadata patterns
8. Classifier: Added 'pasteurisasi', 'sapi', 'uht' keywords for DAIRY
9. Classifier: Moved 'import re' to top of file
10. Classifier: Fixed prompt path to use project root
11. App: Table column "Pasal" β "Dasar Hukum" with full regulation+pasal
12. App: Handle all-MISSING case (warns instead of "semua memenuhi")
13. App: Robust PROJECT_ROOT via __file__
14. LLM Narrator: Fixed prompt paths to use project root
15. Gemini model: Updated from gemini-1.5-flash to gemini-2.0-flash
## Notes
- Python 3.10 required
- numpy<2.0 for torch 2.2.2 compatibility
- sentence-transformers 2.7.0 + transformers 4.40.0
- google-generativeai deprecated β consider migrating to google.genai
|