Natwar commited on
Commit
2a2ef8c
Β·
verified Β·
1 Parent(s): 73805b4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +86 -0
README.md CHANGED
@@ -11,4 +11,90 @@ license: mit
11
  short_description: A Gradio web application that processes employee CSV
12
  ---
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
11
  short_description: A Gradio web application that processes employee CSV
12
  ---
13
 
14
+ # 🧾 Invoice Generator for Launch27 Data
15
+
16
+ A Gradio web application that processes employee CSV files and booking data to generate invoices with automatic tip calculations.
17
+
18
+ ## πŸš€ Quick Start
19
+
20
+ ### For Hugging Face Spaces Deployment:
21
+ 1. Upload `app.py` and `requirements.txt` to your Space
22
+ 2. Set SDK to "Gradio"
23
+ 3. The app will automatically launch
24
+
25
+ ### Local Installation:
26
+ ```bash
27
+ pip install -r requirements.txt
28
+ python app.py
29
+ ```
30
+
31
+ ### Requirements File (`requirements.txt`):
32
+ ```
33
+ gradio
34
+ pandas
35
+ ```
36
+
37
+ ## πŸ“‹ Features
38
+
39
+ - βœ… **Flexible CSV Upload**: Works with 1-3 employee data files
40
+ - βœ… **Automatic Tip Processing**: Extracts and includes tips from booking data
41
+ - βœ… **Date Range Filtering**: Filter records by bi-weekly periods
42
+ - βœ… **Smart Date Parsing**: Handles DD/MM/YY and DD/MM/YYYY formats
43
+ - βœ… **Pivot Table Generation**: Creates summary report by employee
44
+ - βœ… **CSV Export**: Download processed invoice as CSV file
45
+
46
+ ## πŸ“ File Requirements
47
+
48
+ ### Required Files:
49
+ - **Bookings CSV**: Must contain booking data with tips
50
+ - **At least 1 Employee CSV**: Employee work data (1.csv, 2.csv, or 3.csv)
51
+
52
+ ### CSV Format Expected:
53
+ - **Employee Files**: Date, Team, Name, Hourly Rate, Hours Worked, Total
54
+ - **Bookings File**: Date, Teams Assigned (without IDs), Tip
55
+
56
+ ## 🎯 Usage
57
+
58
+ 1. **Upload Files**: Add your employee CSV files and bookings CSV
59
+ 2. **Set Date Range**: Enter start and end dates (YYYY-MM-DD format)
60
+ 3. **Generate**: Click "Generate Invoice" button
61
+ 4. **Download**: Get your processed invoice CSV
62
+
63
+ ## πŸ“Š Output Format
64
+
65
+ The generated invoice includes:
66
+ - Employee summary with total hours and earnings
67
+ - Tips automatically added to respective employees
68
+ - Grand total calculations
69
+ - Matches Launch27 invoice format requirements
70
+
71
+ ## 🌐 Deployment
72
+
73
+ ### Local Development:
74
+ ```bash
75
+ python app.py
76
+ ```
77
+ Access at: `http://localhost:7860`
78
+
79
+ ### Cloud Deployment:
80
+ - **Hugging Face Spaces**: Upload `app.py` and `requirements.txt`
81
+ - **Railway/Render**: Deploy with Python runtime
82
+ - **Docker**: Works with standard Python containers
83
+
84
+ ## πŸ“ Notes
85
+
86
+ - Default date range: August 9-22, 2025
87
+ - Supports flexible employee file combinations
88
+ - Automatically handles name standardization
89
+ - Tips are processed from "Teams Assigned" field in bookings
90
+ - Output format matches expected Final-Invoice.csv structure
91
+
92
+ ## πŸ”§ Technical Details
93
+
94
+ - **Framework**: Gradio for web interface
95
+ - **Data Processing**: Pandas for CSV manipulation
96
+ - **Date Handling**: Flexible parsing with dayfirst=True
97
+ - **File Management**: Temporary files for secure downloads
98
+
99
+
100
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference