File size: 4,548 Bytes
255cbd1 | 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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | # π Digi-Biz Streamlit App
## Quick Start
### 1. Install Dependencies
```bash
pip install streamlit
```
### 2. Run the App
```bash
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
```bash
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
```bash
ollama serve
```
### Qwen Model Not Found
```
Error: Qwen3.5:0.8B Not Available
```
**Solution:** Pull the model
```bash
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
```bash
streamlit run app.py --server.headless=true --server.port=8501
```
### Enable Debug Logging
Add to `app.py`:
```python
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!** π
|