feat: add FastAPI ML backend + Render deploy config#5
Merged
Conversation
Brings the PR sentiment classifier API onto main so Render can deploy it: - api.py / prediction_service.py: FastAPI service serving the trained model - requirements_api.txt: pinned deps (scikit-learn 1.6.1 matches pickled artifacts) - render.yaml: Render Blueprint (web service, /health check, env vars) - Procfile / runtime.txt: gunicorn+uvicorn worker, Python 3.12.3 - RENDER_DEPLOY.md: deploy + local-run docs Model artifacts in output/ are already committed on main. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Brings the PR sentiment classifier FastAPI backend onto
mainso Render can deploy it viarender.yaml(Blueprint pinned tobranch: main).What's included
api.py/prediction_service.py— FastAPI service serving the trained classifierrequirements_api.txt— pinned deps (scikit-learn==1.6.1matches the pickled artifacts inoutput/)render.yaml— Render Blueprint: web service,/healthcheck, env varsProcfile/runtime.txt— gunicorn + uvicorn worker, Python 3.12.3RENDER_DEPLOY.md— deploy + local-run docsVerified
py_compile)requirements_api.txtpr_classifier_model.pkl,feature_scaler.pkl,post_type_encoder.pkl,media_type_encoder.pkl) are already committed inoutput/onmainapi:appentrypoint +/healthmatch the start command andhealthCheckPathinrender.yamlDeploy note
GEMINI_API_KEYissync: false— must be set in the Render dashboard (the app fail-fasts without it).🤖 Generated with Claude Code