Merged
Conversation
|
@SatyamPandey-07 is attempting to deploy a commit to the Om Roy's projects Team on Vercel. A member of the Team first needs to authorize it. |
Thanks for creating a PR for your Issue!
|
|
🎉 Congrats @SatyamPandey-07 on getting your PR merged! 🙌 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Core Pipeline Infrastructure
backend/models/media_payload.py
: Created a centralized database model to track all media uploads (DISEASE, SOIL, CROP, etc.) through their lifecycle (Pending -> Processing -> Completed/Failed).
backend/services/pipeline_service.py
: The central orchestrator handling:
Ingestion: Secure file saving, metadata validation, and database registration.
Dispatch: Triggers specific Celery tasks based on payload type.
Result Attachment: Updates the payload with processing results and notifies the user via WebSockets.
backend/utils/validators.py
: A cross-module validation utility ensuring strict file integrity (MIME type, size, extension) and metadata completeness before processing begins.
backend/api/ingestion.py
: A standardized REST API endpoint (POST /api/v1/ingest/upload) for all media submissions, replacing disparate upload handlers.
Module Integration & Refactoring
backend/tasks/processing_tasks.py
: Implemented the unified worker logic. It dynamically loads specialized modules (Disease, Soil) only when needed to optimize memory usage.
Disease prediction/app.py
: Refactored the standalone Flask app to act as a proxy to the main UDEMP pipeline. It preserves the existing frontend templates (index.html, result.html) but forwards all prediction requests to the centralized backend, ensuring data consistency and auditability.
Soil Classification Model/main.py
: Created a standardized Python wrapper for the soil classification logic (previously locked in notebooks), allowing the backend to programmatically invoke soil analysis.
System Integration
app.py
: Registered the new ingestion_bp blueprint to expose the pipeline API.
backend/models/
init
.py
: Registered the
MediaPayload
model for database migrations.
closes #1459