title: SAP Finance Dashboard with RPT-1-OSS
emoji: π
colorFrom: purple
colorTo: blue
sdk: docker
app_port: 7860
app_file: app_gradio.py
pinned: false
license: apache-2.0
π SAP Finance Dashboard with RPT-1-OSS Model
Production-ready AI-powered financial analysis dashboard with SAP data integration, ML predictions, and interactive visualizations.
π Live Demo: https://huggingface.co/spaces/amitgpt/sap-finance-dashboard-RPT-1-OSS
π Table of Contents
- Overview
- Architecture
- Key Features
- What You'll Achieve
- Prerequisites
- Quick Start
- Local Development
- Deployment
- Project Structure
- Troubleshooting
- License
π― Overview
The SAP Finance Dashboard is an enterprise-grade web application that brings AI-powered financial intelligence to SAP systems. It combines:
- Real-time SAP data through OData connectors
- Advanced ML predictions using the SAP-RPT-1-OSS model (Retrieval-Pretrained Transformer)
- Interactive analytics with Plotly visualizations
- No-code ML training via the Playground tab
- Multi-user support with secure authentication
Perfect for:
- SAP finance teams needing predictive insights
- Data analysts building custom financial models
- Organizations requiring automated SAP reporting
- Learning AI/ML in enterprise contexts
ποΈ Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β Gradio Web Interface β β (Dashboard β’ Data Explorer β’ Predictions β’ Playground) β ββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββ β ββββββββββ΄βββββββββ¬βββββββββββββ¬ββββββββββββββββββ β β β β ββββββΌβββββ ββββββββΌβββββββ βββΌβββββββββββββ ββββΌβββββββββββ β SAP β β SAP-RPT-1- β β Plotly β β Hugging β β OData β β OSS Model β β Visualizer β β Face Hub β βConnectorβ β (Classifier/ β β (Charts) β β (Models) β β β β Regressor) β β β β β βββββββββββ ββββββββββββββββ βββββββββββββββ βββββββββββββββ β β ββββββΌββββββββββββββββββΌββββββββββββββββββ β Python + Pandas + NumPy + PyTorch β ββββββββββββββββββββββββββββββββββββββββββ
β¨ Key Features
1. Dashboard Tab π
- Key financial metrics (Revenue, Expenses, Net Income)
- Revenue vs. Expense breakdown
- Balance sheet analysis
- Real-time metric cards with trend indicators
- Fully interactive Plotly charts
2. Data Explorer Tab π
- Browse synthetic SAP datasets:
- GL Accounts: Chart of Accounts with balances
- Financial Statements: Multi-period P&L and Balance Sheet
- Sales Orders: Order details with line items
- Filter, search, and export capabilities
- Data validation and profiling
3. Upload Tab π€
- Upload custom CSV datasets
- Automatic data validation
- Preview before processing
- Support for various SAP data formats
4. Predictions Tab π€
- AI-powered financial forecasting using SAP-RPT-1-OSS
- Classification tasks (e.g., account categorization)
- Regression tasks (e.g., amount prediction)
- Confidence scores and explainability
- Batch prediction support
5. Playground Tab π οΈ
- No-code ML training interface
- Upload training datasets
- Configure model parameters:
- Context size (2048 for CPU, 8192 for GPU)
- Bagging factor (1-8)
- Model type (Classifier or Regressor)
- Train custom models
- Download predictions and model outputs
- Performance metrics display
6. OData Connector Tab π
- Direct connection to SAP systems
- Real-time data retrieval
- Secure credential handling
- Support for OData v2 and v4
- Query builder interface
π What You'll Achieve
After forking and deploying this repository, you'll have:
β Enterprise Web Application
- Production-ready Gradio interface
- Docker containerization for any cloud platform
- Multi-user authentication support
- Responsive design for desktop/mobile
β AI Integration
- Hands-on experience with the SAP-RPT-1-OSS model
- Understanding of Transformer-based financial predictions
- Custom model training workflows
- Real-time inference optimization
β SAP Integration
- OData connector patterns for SAP systems
- Secure credential management
- Real-time data pipeline examples
- Chart of Accounts and transaction handling
β Cloud Deployment Skills
- Docker multi-stage builds for ML apps
- HuggingFace Spaces deployment
- Azure Container Apps integration (optional)
- Environment management and secrets handling
β Data Science Pipeline
- Data preprocessing and validation
- Feature engineering examples
- Model training and evaluation
- Prediction batch processing
π¦ Prerequisites
Local Development
- Python 3.11+ (tested on 3.11)
- Git (for version control)
- pip (Python package manager)
- Virtual environment (recommended: venv or conda)
For Cloud Deployment
- Docker (for containerization)
- Hugging Face account (free, for SAP-RPT-1-OSS access)
- HF authentication token (for gated models)
For SAP Integration
- SAP OData endpoint URL
- SAP credentials (username/password or OAuth token)
- Network access to SAP system
For GPU Support (Optional)
- NVIDIA GPU (CUDA 11.8+)
- 8GB+ VRAM (recommended for model training)
π Quick Start
Option 1: Run on HuggingFace Spaces (Easiest, 5 minutes)
- Fork this repo to HF Spaces
# Visit: https://huggingface.co/spaces/amitgpt/sap-finance-dashboard-RPT-1-OSS # Click "Files" β "Clone repository"
Accept SAP-RPT-1-OSS Model Access
Go to: https://huggingface.co/SAP/sap-rpt-1-oss Click "Agree" button Create HF Token
https://huggingface.co/settings/tokens Click "New token" β Name it β Select "Read" β Create Add Token to Your Space
Go to your Space settings β "Repository secrets" Add: HF_TOKEN = [your token from step 3] Wait 2-3 minutes for rebuild Done! Your Space will rebuild and start automatically
π See QUICK_START.md for detailed screenshots and troubleshooting Option 2: Local Development (Recommended for customization) Step 1: Clone Repository git clone https://github.com/yourusername/SAP-RPT-1-OSS-App.git cd SAP-RPT-1-OSS-App
Step 2: Create Virtual Environment
On Windows
python -m venv venv venv\Scripts\activate
On macOS/Linux
python3 -m venv venv source venv/bin/activate
Step 3: Install Dependencies
pip install --upgrade pip pip install -r requirements.txt pip install gradio==4.44.1 pip install huggingface-hub==0.24.7 pip install torch==2.0.0 transformers==4.30.0 pip install git+https://github.com/SAP-samples/sap-rpt-1-oss
Step 4: Create Environment File
cp .env.example .env
Edit .env and add:
- HUGGINGFACE_TOKEN=hf_xxxxx
- SAP_USERNAME=your_sap_user (optional)
- SAP_PASSWORD=your_sap_pwd (optional)
- SAP_SERVER=sap_system_url (optional)
Step 5: Run Application python app_gradio.py The app will start at: http://localhost:7860
π³ Docker Deployment Build Docker Image docker build -t sap-finance-dashboard:latest .
π Usage Examples Example 1: View Financial Dashboard Open: http://localhost:7860 Click Dashboard tab See metrics and charts instantly Example 2: Make AI Predictions Go to Predictions tab Upload a CSV with financial data Configure model settings Click "Predict" Download results Example 3: Train Custom Model Go to Playground tab Upload training dataset Set model parameters Click "Train Model" Download predictions and metrics Example 4: Connect to SAP System Go to OData tab Enter SAP credentials and OData endpoint Build query Execute and view results
π€ Contributing We welcome contributions! Please:
Fork the repository Create a feature branch (git checkout -b feature/amazing-feature) Commit changes (git commit -m 'Add amazing feature') Push to branch (git push origin feature/amazing-feature) Open Pull Request
π License This project is licensed under the Apache 2.0 License - see LICENSE file for details.
Attribution: Uses the SAP-RPT-1-OSS model (also Apache 2.0).
π Support Questions? Open an issue on GitHub Deployment help? See QUICK_START.md Authentication issues? See HF_AUTHENTICATION_SETUP.md Status updates? See DEPLOYMENT_STATUS.md
π Roadmap Real-time SAP system synchronization Multi-language support Advanced explainability (SHAP, LIME) Time-series forecasting models Automated report generation (PDF/Excel) Mobile app version Integration with SAP Analytics Cloud
Made with β€οΈ for SAP developers and data scientists to test SAP Opensource RPT-1
Developed by Amit Lal, Microsoft aka.ms/amitlal
Last Updated: December 6, 2025