File upload issue
This commit is contained in:
@@ -12,4 +12,7 @@ output/models/inconsistent_scaler.joblib
|
|||||||
.env
|
.env
|
||||||
__pycache__
|
__pycache__
|
||||||
__pycache__/*
|
__pycache__/*
|
||||||
|
output/*
|
||||||
|
.idea/*
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -298,8 +298,11 @@ async def get_file_if_csv(source: str, file: Optional[UploadFile] = File(None)):
|
|||||||
async def run_streaming_pipeline(
|
async def run_streaming_pipeline(
|
||||||
source: str = "db",
|
source: str = "db",
|
||||||
batch_size: int = 10000,
|
batch_size: int = 10000,
|
||||||
file: Optional[UploadFile] = Depends(get_file_if_csv)
|
UploadFile: str=''):
|
||||||
):
|
|
||||||
|
file = None
|
||||||
|
if len(UploadFile) > 0 :
|
||||||
|
file : Optional[UploadFile] = Depends(get_file_if_csv)
|
||||||
"""
|
"""
|
||||||
Run the complete salary analytics pipeline in batches.
|
Run the complete salary analytics pipeline in batches.
|
||||||
|
|
||||||
@@ -327,6 +330,8 @@ async def run_streaming_pipeline(
|
|||||||
responses = []
|
responses = []
|
||||||
batch_number = 0
|
batch_number = 0
|
||||||
|
|
||||||
|
print("Sal************************", source)
|
||||||
|
|
||||||
def preprocess_chunk(chunk):
|
def preprocess_chunk(chunk):
|
||||||
"""Preprocess a chunk of data with the same logic as DataLoader."""
|
"""Preprocess a chunk of data with the same logic as DataLoader."""
|
||||||
# Convert dates
|
# Convert dates
|
||||||
|
|||||||
Reference in New Issue
Block a user