Digi-Biz / docs /STREAMLIT_APP.md
Deployment Bot
Automated deployment to Hugging Face
255cbd1

πŸ“„ Digi-Biz Streamlit App

Quick Start

1. Install Dependencies

pip install streamlit

2. Run the App

streamlit run app.py

The app will open in your browser at http://localhost:8501


Features

πŸ“€ Upload Tab

  • Upload ZIP files containing business documents
  • Supports PDF, DOCX, XLSX, images, videos
  • Shows file size and job ID

βš™οΈ Processing Tab

  • Real-time progress through 5 agents:
    1. File Discovery Agent
    2. Document Parsing Agent
    3. Table Extraction Agent
    4. Media Extraction Agent
    5. Vision Agent (Qwen3.5:0.8B)
  • Live status updates
  • Error handling with graceful degradation

πŸ“Š Results Tab

  • File discovery summary (documents, images, videos)
  • Document parsing results (pages, text preview)
  • Table extraction results (count, types)
  • Expandable details for each section

πŸ–ΌοΈ Vision Analysis Tab

  • Image gallery with analysis results
  • Category classification (product, service, food, etc.)
  • Confidence scores
  • Tags and descriptions
  • Product/service detection
  • Association suggestions

Sidebar Features

  • Model Status: Shows Ollama server and Qwen model availability
  • Agent Cards: Quick reference for all 5 agents
  • Reset Button: Clear all session data and start fresh

Requirements

System Requirements

  • Python 3.10+
  • Ollama installed and running
  • Qwen3.5:0.8b model pulled

Python Packages

pip install -r requirements.txt

Usage Example

  1. Prepare ZIP file with business documents:

    • Restaurant menu PDFs
    • Product catalogs
    • Service brochures
    • Business cards
    • Product photos
  2. Upload the ZIP file in the "Upload" tab

  3. Click "Start Processing" - watch real-time progress

  4. View Results in "Results" and "Vision Analysis" tabs


Troubleshooting

Ollama Not Running

Error: Ollama Server Not Running

Solution: Start Ollama server

ollama serve

Qwen Model Not Found

Error: Qwen3.5:0.8B Not Available

Solution: Pull the model

ollama pull qwen3.5:0.8b

Processing Timeout

If processing takes too long:

  • Reduce number of images in ZIP
  • Vision analysis processes first 3 images by default
  • Increase timeout in vision_agent.py

Screenshots

The app provides:

  • βœ… Clean, modern UI with custom styling
  • βœ… Progress bars and status indicators
  • βœ… Interactive expandable sections
  • βœ… Image gallery with analysis overlays
  • βœ… Real-time agent status updates

Development

Run in Development Mode

streamlit run app.py --server.headless=true --server.port=8501

Enable Debug Logging

Add to app.py:

import logging
logging.basicConfig(level=logging.DEBUG)

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Streamlit Frontend              β”‚
β”‚  - Upload component                     β”‚
β”‚  - Progress tracking                    β”‚
β”‚  - Results display                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Agent Pipeline                  β”‚
β”‚  1. File Discovery Agent                β”‚
β”‚  2. Document Parsing Agent              β”‚
β”‚  3. Table Extraction Agent              β”‚
β”‚  4. Media Extraction Agent              β”‚
β”‚  5. Vision Agent (Qwen3.5:0.8B)         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Ollama (Qwen Vision)            β”‚
β”‚  - Image analysis                       β”‚
β”‚  - Category classification              β”‚
β”‚  - Tag generation                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Next Steps

After the demo:

  1. Review extracted data
  2. Export results (JSON export coming soon)
  3. Edit/refine results (editing UI in development)
  4. Integrate with downstream systems

Enjoy using Digi-Biz! πŸš€