--- title: Biweekly Invoice Generator emoji: ๐Ÿ“Š colorFrom: red colorTo: gray sdk: gradio sdk_version: 5.44.1 app_file: app.py pinned: false license: mit short_description: A Gradio web application that processes employee CSV --- # ๐Ÿงพ Invoice Generator for Launch27 Data A Gradio web application that processes employee CSV files and booking data to generate invoices with automatic tip calculations. ## ๐Ÿš€ Quick Start ### For Hugging Face Spaces Deployment: 1. Upload `app.py` and `requirements.txt` to your Space 2. Set SDK to "Gradio" 3. The app will automatically launch ### Local Installation: ```bash pip install -r requirements.txt python app.py ``` ### Requirements File (`requirements.txt`): ``` gradio pandas ``` ## ๐Ÿ“‹ Features - โœ… **Flexible CSV Upload**: Works with 1-3 employee data files - โœ… **Automatic Tip Processing**: Extracts and includes tips from booking data - โœ… **Date Range Filtering**: Filter records by bi-weekly periods - โœ… **Smart Date Parsing**: Handles DD/MM/YY and DD/MM/YYYY formats - โœ… **Pivot Table Generation**: Creates summary report by employee - โœ… **CSV Export**: Download processed invoice as CSV file ## ๐Ÿ“ File Requirements ### Required Files: - **Bookings CSV**: Must contain booking data with tips - **At least 1 Employee CSV**: Employee work data (1.csv, 2.csv, or 3.csv) ### CSV Format Expected: - **Employee Files**: Date, Team, Name, Hourly Rate, Hours Worked, Total - **Bookings File**: Date, Teams Assigned (without IDs), Tip ## ๐ŸŽฏ Usage 1. **Upload Files**: Add your employee CSV files and bookings CSV 2. **Set Date Range**: Enter start and end dates (YYYY-MM-DD format) 3. **Generate**: Click "Generate Invoice" button 4. **Download**: Get your processed invoice CSV ## ๐Ÿ“Š Output Format The generated invoice includes: - Employee summary with total hours and earnings - Tips automatically added to respective employees - Grand total calculations - Matches Launch27 invoice format requirements ## ๐ŸŒ Deployment ### Local Development: ```bash python app.py ``` Access at: `http://localhost:7860` ### Cloud Deployment: - **Hugging Face Spaces**: Upload `app.py` and `requirements.txt` - **Railway/Render**: Deploy with Python runtime - **Docker**: Works with standard Python containers ## ๐Ÿ“ Notes - Default date range: August 9-22, 2025 - Supports flexible employee file combinations - Automatically handles name standardization - Tips are processed from "Teams Assigned" field in bookings - Output format matches expected Final-Invoice.csv structure ## ๐Ÿ”ง Technical Details - **Framework**: Gradio for web interface - **Data Processing**: Pandas for CSV manipulation - **Date Handling**: Flexible parsing with dayfirst=True - **File Management**: Temporary files for secure downloads Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference