Spaces:
Running
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
- Ingest test: ChromaDB populated (923 chunks: 131+186+389+217)
- Extractor test: BOTH colon format AND dot separator format pass β
- Classifier test: 4/4 categories correct β
- Rule engine test: 2 violations detected (ALT, Timbal_Pb) β
- RAG query test: semantic search returns relevant results β
- LLM narrator test: fallback narration works β
- Report generator test: PDF generated β
- App test: Gradio boots on http://127.0.0.1:7860 β
Bug Fixes Applied (2026-05-28)
- Extractor: Added flexible _SEP pattern for dot/colon/dash separators
- Extractor: Added "Total Plate Count"/"TPC" aliases for ALT
- Extractor: Handle "Kapang dan Khamir" combined format
- Extractor: Handle "Kadar Timbal (Pb)" with dot separator
- Extractor: Added _preprocess_text for multiline Key:\nValue format
- Extractor: Added _extract_section for === SECTION === format
- Extractor: Added "Tanggal Pengujian", "Produsen" to metadata patterns
- Classifier: Added 'pasteurisasi', 'sapi', 'uht' keywords for DAIRY
- Classifier: Moved 'import re' to top of file
- Classifier: Fixed prompt path to use project root
- App: Table column "Pasal" β "Dasar Hukum" with full regulation+pasal
- App: Handle all-MISSING case (warns instead of "semua memenuhi")
- App: Robust PROJECT_ROOT via file
- LLM Narrator: Fixed prompt paths to use project root
- 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