Spaces:
Sleeping
Sleeping
Update modelLoanAPI.py
Browse files- modelLoanAPI.py +3 -3
modelLoanAPI.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
|
| 2 |
from fastapi import FastAPI, HTTPException
|
| 3 |
from pydantic import BaseModel
|
| 4 |
import pandas as pd
|
|
@@ -33,9 +33,9 @@ async def predict_worker_earnings(request: WorkerIdRequest):
|
|
| 33 |
|
| 34 |
# Load data
|
| 35 |
try:
|
| 36 |
-
df = pd.read_csv('extended_worker_dataset.csv')
|
| 37 |
except FileNotFoundError:
|
| 38 |
-
raise HTTPException(status_code=500, detail="CSV file not found at extended_worker_dataset.csv")
|
| 39 |
except Exception as e:
|
| 40 |
raise HTTPException(status_code=500, detail=f"Error reading CSV file: {str(e)}")
|
| 41 |
|
|
|
|
| 1 |
+
|
| 2 |
from fastapi import FastAPI, HTTPException
|
| 3 |
from pydantic import BaseModel
|
| 4 |
import pandas as pd
|
|
|
|
| 33 |
|
| 34 |
# Load data
|
| 35 |
try:
|
| 36 |
+
df = pd.read_csv('/app/data/extended_worker_dataset.csv')
|
| 37 |
except FileNotFoundError:
|
| 38 |
+
raise HTTPException(status_code=500, detail="CSV file not found at /app/data/extended_worker_dataset.csv")
|
| 39 |
except Exception as e:
|
| 40 |
raise HTTPException(status_code=500, detail=f"Error reading CSV file: {str(e)}")
|
| 41 |
|