fix: route Modi script OCR upload to FastAPI NLP Orchestrator (port 8…#693
Open
Kritika200520 wants to merge 1 commit into
Open
fix: route Modi script OCR upload to FastAPI NLP Orchestrator (port 8…#693Kritika200520 wants to merge 1 commit into
Kritika200520 wants to merge 1 commit into
Conversation
…001) The handleOCRUpload function in VakilFriendPage.jsx was incorrectly posting to \/ocr/modi (Spring Boot, port 8080), which does not expose that endpoint, causing a 404 Not Found error. Changes: - apiConfig.js: export NLP_BASE_URL pointing to the FastAPI NLP Orchestrator (localhost:8001 locally, configurable via VITE_NLP_BASE_URL env var for production). - VakilFriendPage.jsx: import NLP_BASE_URL and use it for the /ocr/modi POST request so TrOCR-based Modi script transcription is handled by the correct service. Fixes: Modi script OCR 404 Not Found error in Vakil Friend chat.
|
Someone is attempting to deploy a commit to the CodeBlooded's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Description
When attempting to upload a Modi script document for OCR scanning, the frontend incorrectly sent the upload request to the Spring Boot backend server (port 8080) instead of the FastAPI NLP Orchestrator service (port 8001), resulting in an immediate 404 Not Found error.
This PR introduces
NLP_BASE_URLin the frontend API configuration to cleanly target port 8001 for machine learning & OCR microservices, and updates the OCR scanner component to utilize it.Changes:
apiConfig.js: Added and exportedNLP_BASE_URLpointing to the FastAPI NLP Orchestrator (port8001locally, with fallback/production configuration support).VakilFriendPage.jsx: ImportedNLP_BASE_URLand updated the/ocr/modiPOST endpoint call inhandleOCRUploadto route to the correct FastAPI ML orchestrator service.Fixes: Modi script OCR 404 Not Found error.
Type of change
Checklist: