Skip to content

Add batch upload, model selector, PDF export, and charts#1

Open
pypi-ahmad wants to merge 2 commits into
47thtechcorner:masterfrom
pypi-ahmad:contrib/tabfm-batch-model-pdf-charts
Open

Add batch upload, model selector, PDF export, and charts#1
pypi-ahmad wants to merge 2 commits into
47thtechcorner:masterfrom
pypi-ahmad:contrib/tabfm-batch-model-pdf-charts

Conversation

@pypi-ahmad

Copy link
Copy Markdown

Summary

This PR implements the four upgrades listed in the project's README roadmap and keeps the app focused on TabFM + Ollama:

  1. Batch Upload (one train CSV + multiple test CSVs)
  2. Ollama model selector dropdown (auto-discovered from local /api/tags)
  3. PDF export for insights
  4. Plotly charts for prediction/confidence metrics

Key Changes

  • Added CSV Upload and Batch Upload modes in Streamlit UI.
  • Added local Ollama model discovery and selectable model for insight generation.
  • Added downloadable PDF reports for single-run and batch-run insights.
  • Added Plotly charts:
    • predicted class distribution
    • confidence distribution (single mode)
    • aggregate class distribution (batch mode)
  • Improved prediction flow to avoid duplicated inference calls in-app by deriving labels from one probability pass.

Dependency Updates

  • Added:
    • plotly
    • reportlab
    • safetensors (for environments where TabFM load requires it)

Validation

Ran locally:

  • python3 -m py_compile app.py
  • python3 -c "from tabfm import tabfm_v1_0_0_pytorch as b; b.load(); print('TabFM OK')"
  • Manual Streamlit checks for:
    • single CSV mode
    • batch mode with multiple test CSVs
    • model selector behavior
    • PDF downloads
    • chart rendering

Notes

  • outputs.md generated artifacts were intentionally excluded from this PR to keep the review diff clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant