Delete QUICKSTART.md
Browse files- QUICKSTART.md +0 -84
QUICKSTART.md
DELETED
|
@@ -1,84 +0,0 @@
|
|
| 1 |
-
# Quick Start Guide
|
| 2 |
-
|
| 3 |
-
## Local Development
|
| 4 |
-
|
| 5 |
-
1. **Install dependencies:**
|
| 6 |
-
```bash
|
| 7 |
-
pip install -r requirements.txt
|
| 8 |
-
```
|
| 9 |
-
|
| 10 |
-
2. **Set environment variable:**
|
| 11 |
-
```bash
|
| 12 |
-
# Windows PowerShell
|
| 13 |
-
$env:MONGODB_URI="mongodb://expenseuser:Kem_6o%3F%3F@165.227.69.221:27017/expense?authSource=admin"
|
| 14 |
-
|
| 15 |
-
# Linux/Mac
|
| 16 |
-
export MONGODB_URI="mongodb://expenseuser:Kem_6o%3F%3F@165.227.69.221:27017/expense?authSource=admin"
|
| 17 |
-
```
|
| 18 |
-
|
| 19 |
-
3. **Run the application:**
|
| 20 |
-
```bash
|
| 21 |
-
uvicorn app.main:app --reload
|
| 22 |
-
```
|
| 23 |
-
|
| 24 |
-
4. **Access the API:**
|
| 25 |
-
- API: http://localhost:8000
|
| 26 |
-
- Docs: http://localhost:8000/docs
|
| 27 |
-
- Health: http://localhost:8000/health
|
| 28 |
-
|
| 29 |
-
## Test the Smart Budget Recommendation
|
| 30 |
-
|
| 31 |
-
1. **Create some sample expenses:**
|
| 32 |
-
```bash
|
| 33 |
-
curl -X POST "http://localhost:8000/expenses" \
|
| 34 |
-
-H "Content-Type: application/json" \
|
| 35 |
-
-d '{
|
| 36 |
-
"user_id": "user123",
|
| 37 |
-
"amount": 3800,
|
| 38 |
-
"category": "Groceries",
|
| 39 |
-
"description": "Monthly groceries",
|
| 40 |
-
"date": "2024-01-15T00:00:00",
|
| 41 |
-
"type": "expense"
|
| 42 |
-
}'
|
| 43 |
-
```
|
| 44 |
-
|
| 45 |
-
2. **Get recommendations:**
|
| 46 |
-
```bash
|
| 47 |
-
curl "http://localhost:8000/recommendations/user123?month=2&year=2024"
|
| 48 |
-
```
|
| 49 |
-
|
| 50 |
-
Expected response:
|
| 51 |
-
```json
|
| 52 |
-
[
|
| 53 |
-
{
|
| 54 |
-
"category": "Groceries",
|
| 55 |
-
"average_expense": 3800.0,
|
| 56 |
-
"recommended_budget": 4000.0,
|
| 57 |
-
"reason": "Your average monthly grocery expense is Rs.3,800. We suggest setting your budget to Rs.4,000 for next month (includes a 5% buffer for variability).",
|
| 58 |
-
"confidence": 0.85
|
| 59 |
-
}
|
| 60 |
-
]
|
| 61 |
-
```
|
| 62 |
-
|
| 63 |
-
## Docker Deployment
|
| 64 |
-
|
| 65 |
-
1. **Build the image:**
|
| 66 |
-
```bash
|
| 67 |
-
docker build -t smart-budget-recommendation .
|
| 68 |
-
```
|
| 69 |
-
|
| 70 |
-
2. **Run the container:**
|
| 71 |
-
```bash
|
| 72 |
-
docker run -p 8000:8000 -e MONGODB_URI="your_mongodb_uri" smart-budget-recommendation
|
| 73 |
-
```
|
| 74 |
-
|
| 75 |
-
## Hugging Face Deployment
|
| 76 |
-
|
| 77 |
-
See `HUGGINGFACE_DEPLOYMENT.md` for detailed instructions.
|
| 78 |
-
|
| 79 |
-
Quick steps:
|
| 80 |
-
1. Create a new Docker Space on Hugging Face
|
| 81 |
-
2. Add `MONGODB_URI` as a secret
|
| 82 |
-
3. Upload all files
|
| 83 |
-
4. Wait for automatic build and deployment
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|