Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phase 4: Streamlit Web Interface

✅ COMPLETE - Modern Glassmorphic UI

🎨 Design Features

Glassmorphism Design:

  • ✅ Transparent glass-like cards with blur effect
  • ✅ Gradient purple background (667eea → 764ba2)
  • ✅ Hover animations on all cards
  • ✅ Modern typography (Inter + Noto Sans Bengali)
  • ✅ Larger text and icons for better readability
  • ✅ Glassmorphic sidebar navigation

UI Components:

  • ✅ 5 Complete pages (Home, Single Review, Batch, History, About)
  • ✅ All buttons working with proper navigation
  • ✅ Responsive layout with proper spacing
  • ✅ Professional color scheme

📁 File Structure

04_Phase4_WebInterface/
├── backend/
│   └── phase3_integration.py      # Phase 3 wrapper
├── streamlit_app/
│   ├── Home.py                    # Main landing page
│   └── pages/
│       ├── 1_✍️_Single_Review.py  # Single generation
│       ├── 2_📦_Batch_Processing.py # Batch processing
│       ├── 3_📜_History.py         # History management
│       └── 4_📚_About.py           # System info
├── test_backend.py                # Backend test
├── test_complete_system.py        # Full system test
├── test_navigation.py             # Navigation test
└── README.md                      # This file

🚀 Quick Start

# Navigate to streamlit app
cd E:\Research\Thesis\Agent\MovieReviewAgent\04_Phase4_WebInterface\streamlit_app

# Run Streamlit
python -m streamlit run Home.py

Browser will open at: http://localhost:8501

✅ All Tests Passed

Test 1: Backend Integration

  • ✅ Phase 3 integration working
  • ✅ All agents accessible
  • ✅ All tools loaded

Test 2: Page Files

  • ✅ Home.py exists
  • ✅ All 4 sub-pages exist
  • ✅ Proper file naming

Test 3: Navigation

  • ✅ Home → Single Review button works
  • ✅ Home → Batch Processing button works
  • ✅ All st.switch_page() calls correct

Test 4: Dependencies

  • ✅ Streamlit installed
  • ✅ Pandas, openpyxl installed
  • ✅ Plotly, altair installed
  • ✅ All Phase 3 dependencies available

🎯 Features

Home Page:

  • Glassmorphic header with system title
  • 4 stat cards (Reviews, Accuracy, Success, Generated)
  • System architecture overview (4 agents)
  • 3 persona cards with details
  • Quick start buttons
  • Model Info: Using shksabbir7/bengali-movie-review-classifier from HuggingFace

Single Review Page:

  • Text area for movie plot input
  • Example plots dropdown
  • Persona selection
  • Max retries slider
  • Real-time progress tracking
  • Results with metrics
  • Download options (JSON, TXT)
  • Full error handling (API quota, validation)

Batch Processing Page:

  • CSV upload with validation
  • Template download
  • File preview
  • Batch settings
  • Real-time progress with live metrics
  • Results table
  • Download options (JSON, CSV, Excel)

History Page:

  • Session listing
  • Search and filter
  • Sort options
  • Expandable details
  • Download individual sessions
  • Bulk export (JSON, CSV)
  • Delete functionality

About Page:

  • Project overview
  • System architecture
  • 3 persona tabs with examples
  • Performance metrics
  • Tech stack
  • Research contributions
  • Citation

🎨 Design Improvements

Before:

  • Basic white cards
  • Simple gradient header
  • Small text
  • Standard buttons

After:

  • ✅ Glassmorphic transparent cards
  • ✅ Blur backdrop effects
  • ✅ Larger text (3rem headers, 1.1rem body)
  • ✅ Hover animations (translateY, shadow)
  • ✅ Modern gradient background
  • ✅ Professional spacing

🛠️ Tech Stack

Backend:

  • Phase 3 Multi-Agent System
  • BanglaBERT: shksabbir7/bengali-movie-review-classifier (HuggingFace Hub)
  • Google Gemini API
  • ChromaDB + LaBSE

Frontend:

  • Streamlit 1.56+
  • Pandas, Plotly, Altair
  • Custom CSS (Glassmorphism)

Model:

  • Trained BanglaBERT (87.49% accuracy)
  • Deployed on HuggingFace Hub
  • Public access for research

API Errors:

  • ✅ Quota exceeded detection
  • ✅ User-friendly error messages
  • ✅ Retry suggestions

Validation Errors:

  • ✅ Empty input detection
  • ✅ Minimum length check
  • ✅ CSV format validation

System Errors:

  • ✅ Exception catching
  • ✅ Detailed error logs
  • ✅ Graceful degradation

📊 Performance

Load Time:

  • First load: ~2-3 seconds (model loading)
  • Subsequent: <1 second

Generation Time:

  • Single review: ~30 seconds
  • Batch (10 plots): ~5 minutes

Memory Usage:

  • Base: ~500MB
  • With models: ~2GB

🌐 Deployment Ready

Local:

  • ✅ Works on Windows
  • ✅ Works on localhost:8501
  • ✅ HuggingFace model auto-downloads on first run

Streamlit Cloud:

  • ✅ Deployed and running
  • ✅ Model loads from HuggingFace Hub: shksabbir7/bengali-movie-review-classifier
  • ✅ No local model files needed
  • ✅ Free tier compatible
  • ✅ Automatic updates on git push

📝 Next Steps

Phase 5: Evaluation (Optional)

  • Batch testing (100+ plots)
  • Human evaluation
  • Performance benchmarking
  • Statistical analysis

Phase 6: Thesis Writing

  • Use screenshots from web interface
  • Include performance metrics
  • Document user experience

🎓 Thesis Integration

Figures to Include:

  • Screenshot of Home page (glassmorphic design)
  • Screenshot of Single Review generation
  • Screenshot of results with metrics
  • Screenshot of batch processing

Metrics to Report:

  • Web interface load time
  • User interaction flow
  • Error handling coverage
  • Accessibility features

🏆 Achievements

✅ Modern glassmorphic UI design ✅ Full error handling and validation ✅ Bengali font support (Noto Sans Bengali) ✅ All navigation buttons working ✅ Download options (JSON, CSV, Excel, TXT) ✅ Session management and history ✅ Real-time progress tracking ✅ Responsive layout ✅ Professional color scheme ✅ Hover animations and transitions


Status: ✅ COMPLETE Version: 4.0.0 Last Updated: 2026-04-18

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages