Spaces:
Sleeping
Sleeping
Commit History
2 days ago
-
Update dependencies and fix runtime bugs found in audit
Dependencies - Pin Streamlit 1.67.0 and Python 3.12 via README sdk_version/python_version - Update all packages to current releases (pandas 3.1, numpy 2.5, plotly 7.1, PyMuPDF 2.1, Pillow 13, OpenCV 5, reportlab 5.1, google-genai 3.1, firebase-admin 7.7, Document AI 3.17) - Remove unused packages: langchain, langchain-core, langchain-community, langchain-google-genai, langsmith, google-generativeai (deprecated), fpdf2, imageio, python-docx, python-dotenv, pyyaml - Add beautifulsoup4 (used for HTML table parsing) and packages.txt with tesseract-ocr so the Tesseract OCR fallback works on Spaces Streamlit API - Replace deprecated use_container_width=True with width="stretch" (136 calls) - Replace deprecated st.components.v1.html with st.iframe via embed_html helper Bug fixes - CropDrive parent-window listener script had a JS syntax error (doubled braces in a non f-string), so language/config messages were never handled - OCR: missing `io` import broke PDF-to-image conversion…3f62288
-
Use latest Gemini 3.1 Pro as default analysis model
Mark CuizonPrefer gemini-3.1-pro-preview with fallbacks to gemini-3.6-flash, gemini-3.5-flash, and gemini-2.5-pro. Map bare gemini-3.1 aliases to the full Pro endpoint and keep image/audio models blocked for text analysis.b4bd144 -
Restore robust Gemini init so analysis steps use real LLM results
Mark CuizonBlock broken gemini-3.x model IDs, prefer gemini-2.5-pro with multi-model fallback, restore google.genai client path, and switch models on 404 during generate_content so steps 1-6 no longer fall back by default.6b26e92 -
Simplify Gemini client path and prefer gemini-3.1
Mark CuizonUse the legacy google.generativeai client with a shorter model fallback list headed by gemini-3.1, and restore direct error details in fallback analysis responses.88a0782
-
Harden Gemini model selection and hide fallback error metadata
Mark Cuizon3c12ca1 -
Fix results rendering and Gemini fallback robustness
Mark Cuizon3e1ad08 -
refactor: simplify Step 2/3 results, severity thresholds, and analysis progress UI
Mark CuizonRestore simpler recommendation display and MPOB severity matching in analysis/results, and streamline Streamlit step progress updates during AI analysis.e30538d -
fix: Step 2 real issues, clean Step 1/3 formatting, stop empty re-extract
Mark CuizonKeep pre-extracted soil/leaf parameter_statistics instead of wiping them. Rebuild Step 2 from real averages with correct severity thresholds. Format Step 3 solutions as cards; strip ### and raw Action/Headers dumps; skip placeholder tables.95837b5 -
fix: analysis progress UI, Gemini models, and Step 2/3/5 results
Mark CuizonShorten AI progress labels to stop duplicating full step prompts. Prefer gemini-2.5-pro/flash. Rebuild Step 2/3/5 narratives from real issues and economic forecast when LLM returns placeholders. Route Step 2 and 5 through dedicated renderers and hide empty Issues Source dumps.f8d30ca -
fix: parse SP Lab OCR from real text and restore Gemini analysis
Mark CuizonRemove hardcoded SP Lab sample values so structured OCR matches raw OCR (including pH). Resolve Gemini API keys from common HF secret names and use valid models with probe verification instead of gemini-3.1 fallback-only runs.5cac7b6
-
Merge hf/main: resolve conflicts, keep HF fixes and translations
Mark Cuizona5c3983 -
fix-bodystreambuffer-hf
Mark Cuizon8f155fd
-
Add Malay/Indonesian translation coverage and switch to Gemini 3.1
Mark Cuizonf746550
-
feat: add Indonesian (Bahasa Indonesia) language support
Mark Cuizon- Add full 'id' translation dictionary to translations.py with ~300+ keys - Update get_language(), set_language(), toggle_language() to support 'id' - Toggle now cycles en -> ms -> id -> en - Add Indonesian LLM language instruction in analysis_engine.py - Update all language validations in cropdrive_integration.py to include 'id' - Update app.py fallback language checks to include 'id' - AI assistant, analysis results and PDF reports all translate to Indonesian when lang=idb63bb45
-
Fix executive summary language translation and remove Data Visualizations section before detailed conclusion
9bca8e4 -
Remove trailing whitespace in analysis_engine.py
526e836 -
Update analysis engine and results module
e470a25
-
Update analysis engine and restore gitignore
5019af7 -
Add Malaysian language support for analysis results and PDF generation
- Updated analysis engine to generate AI content in selected language (English/Malaysian) - Added language-aware instructions to LLM prompts for multilingual analysis - Added comprehensive result-related translations for Malaysian language - Ensured PDF generation uses current language for all content - User context from website is properly captured and stored with analysis results5761a4f
-
Fix: Read GOOGLE_AI_API_KEY from env var for Gemini LLM initialization
694ca21 -
clean repo
fb5dc87