Spaces:
Running
Running
Commit
·
09bcb2a
1
Parent(s):
8944b25
Update README.md to remove detailed application description and features
Browse files
README.md
CHANGED
|
@@ -9,63 +9,4 @@ license: apache-2.0
|
|
| 9 |
short_description: Use LLMs to parse bank messages and write to Google Sheet
|
| 10 |
---
|
| 11 |
|
| 12 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 13 |
-
|
| 14 |
-
# Expense Tracker 📊
|
| 15 |
-
|
| 16 |
-
A FastAPI-based application that uses LLMs to parse bank transaction messages and write structured data to a Google Sheet.
|
| 17 |
-
|
| 18 |
-
## Features
|
| 19 |
-
|
| 20 |
-
- **Classifies incoming messages** as Transaction, OTP, Promotional, Scheduled, or Non-Transaction using LLMs.
|
| 21 |
-
- **Parses transaction messages** to extract structured details (amount, type, receiver, category, date, origin).
|
| 22 |
-
- **Writes parsed transactions** directly to a connected Google Sheet.
|
| 23 |
-
- **Supports multiple LLM providers** (Google Gemini, Groq).
|
| 24 |
-
- **Secured endpoints** using a token header.
|
| 25 |
-
|
| 26 |
-
## Requirements
|
| 27 |
-
|
| 28 |
-
- Python 3.11+
|
| 29 |
-
- Google Service Account credentials for Google Sheets access
|
| 30 |
-
|
| 31 |
-
## Setup
|
| 32 |
-
|
| 33 |
-
1. **Clone the repository** and navigate to the project directory.
|
| 34 |
-
|
| 35 |
-
2. **Install dependencies:**
|
| 36 |
-
```sh
|
| 37 |
-
pip install -r requirements.txt
|
| 38 |
-
```
|
| 39 |
-
|
| 40 |
-
3. **Configure environment variables:**
|
| 41 |
-
|
| 42 |
-
Create a `.env` file with the following variables:
|
| 43 |
-
```
|
| 44 |
-
SHEET_URL=<your_google_sheet_url>
|
| 45 |
-
GOOGLESHEETS_CREDENTIALS=<your_google_service_account_json>
|
| 46 |
-
GROQ_API_KEY=<your_groq_api_key>
|
| 47 |
-
HF_TOKEN=<your_auth_token>
|
| 48 |
-
GOOGLE_API_KEY=<your_google_api_key>
|
| 49 |
-
```
|
| 50 |
-
|
| 51 |
-
4. **Run the application:**
|
| 52 |
-
```sh
|
| 53 |
-
uvicorn app:app --host 0.0.0.0 --port 7860
|
| 54 |
-
```
|
| 55 |
-
|
| 56 |
-
## Usage
|
| 57 |
-
|
| 58 |
-
- **POST `/write_message`**
|
| 59 |
-
Send a JSON payload:
|
| 60 |
-
```json
|
| 61 |
-
{
|
| 62 |
-
"message": "Your bank transaction SMS or notification text"
|
| 63 |
-
}
|
| 64 |
-
```
|
| 65 |
-
Include the `header` with your `HF_TOKEN`.
|
| 66 |
-
|
| 67 |
-
- **GET `/`**
|
| 68 |
-
Health check and welcome message.
|
| 69 |
-
|
| 70 |
-
- **POST `/test`**
|
| 71 |
-
Test endpoint to verify authentication.
|
|
|
|
| 9 |
short_description: Use LLMs to parse bank messages and write to Google Sheet
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|