Skip to content

feat: add FastAPI ML backend + Render deploy config#5

Merged
f1shyfang merged 1 commit into
mainfrom
deploy/render-backend
May 30, 2026
Merged

feat: add FastAPI ML backend + Render deploy config#5
f1shyfang merged 1 commit into
mainfrom
deploy/render-backend

Conversation

@f1shyfang
Copy link
Copy Markdown
Owner

Brings the PR sentiment classifier FastAPI backend onto main so Render can deploy it via render.yaml (Blueprint pinned to branch: main).

What's included

  • api.py / prediction_service.py — FastAPI service serving the trained classifier
  • requirements_api.txt — pinned deps (scikit-learn==1.6.1 matches the pickled artifacts in output/)
  • 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

Verified

  • Both Python files compile (py_compile)
  • All third-party imports covered by requirements_api.txt
  • Model artifacts the service loads (pr_classifier_model.pkl, feature_scaler.pkl, post_type_encoder.pkl, media_type_encoder.pkl) are already committed in output/ on main
  • api:app entrypoint + /health match the start command and healthCheckPath in render.yaml

Deploy note

GEMINI_API_KEY is sync: false — must be set in the Render dashboard (the app fail-fasts without it).

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings May 30, 2026 06:06
@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lyra-hackathon Ready Ready Preview, Comment May 30, 2026 6:07am

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@f1shyfang f1shyfang merged commit 34a07d3 into main May 30, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants