Skip to content

Commit 489a769

Browse files
Update main.py
1 parent fe3080f commit 489a769

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

api/main.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
import uuid
23
import threading
34
import time
@@ -15,7 +16,6 @@
1516
from .temp_manager import (
1617
ensure_temp_dir, write_to_temp, delete_from_temp, cleanup_on_startup
1718
)
18-
from .ml_stub import run_ml
1919
from .minio_client import ensure_bucket, upload_to_minio
2020
from .logger import get_logger
2121

@@ -184,11 +184,7 @@ async def upload_file(file: UploadFile = File(...), db: Session = Depends(get_db
184184
temp_path = write_to_temp(file_bytes, file.filename)
185185
logger.info(f"Temp file written — path={temp_path}", extra={"status": "success"})
186186

187-
# Step 4 — ML stub + MinIO
188-
logger.info("ML stub invoked", extra={"status": "called"})
189-
run_ml(temp_path)
190-
logger.info("ML stub complete", extra={"status": "success"})
191-
187+
# Step 4 — MinIO upload (ML handled by agents pipeline)
192188
object_name = f"{uuid.uuid4().hex}.{ext}"
193189
minio_object = upload_to_minio(temp_path, object_name)
194190
logger.info(
@@ -231,4 +227,4 @@ def _run_agents():
231227
filename=file.filename,
232228
size_mb=size_mb,
233229
minio_object=minio_object,
234-
)
230+
)

0 commit comments

Comments
 (0)