Skip to content

BenedictS24/career-guidance-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Career Guidance Flask App

A Python Flask web application that provides AI-powered career guidance by analyzing CVs and career goals.

Deployment on Render

Prerequisites

  1. A Render account (free at render.com)
  2. OpenAI API key

Deployment Steps

  1. Fork/Clone this repository to your GitHub account

  2. Create a new Web Service on Render:

    • Go to Render Dashboard
    • Click "New" → "Web Service"
    • Connect your GitHub repository
  3. Configure the service:

    • Name: career-guide-ai (or your preferred name)
    • Environment: Python 3
    • Build Command: pip install -r requirements.txt
    • Start Command: gunicorn --bind 0.0.0.0:$PORT app:app
  4. Set Environment Variables:

    • OPENAI_API_KEY: Your OpenAI API key
    • SECRET_KEY: A secure random string (Render can auto-generate this)
  5. Deploy:

    • Click "Create Web Service"
    • Render will automatically build and deploy your app

Environment Variables Required

Variable Description Required
OPENAI_API_KEY Your OpenAI API key Yes
SECRET_KEY Flask secret key for sessions Yes
PORT Port number (auto-set by Render) Auto

Local Development

  1. Install dependencies: ```bash pip install -r requirements.txt ```

  2. Set environment variables: ```bash export OPENAI_API_KEY=your_api_key_here export SECRET_KEY=your_secret_key_here ```

  3. Run the app: ```bash python app.py ```

Features

  • Upload PDF CVs
  • Input career goals
  • AI-powered career analysis using OpenAI
  • Download career guidance reports
  • Responsive web interface
  • Production-ready logging
  • Health check endpoint

File Structure

``` career-guidance-app/ ├── app.py # Main Flask application ├── requirements.txt # Python dependencies ├── Procfile # Process file for deployment ├── render.yaml # Render configuration ├── runtime.txt # Python version specification ├── templates/ # HTML templates │ ├── base.html │ ├── index.html │ ├── upload.html │ └── results.html └── README.md ```

API Endpoints

  • GET / - Home page
  • GET /upload - Upload form
  • POST /analyze - Process CV and career goals
  • GET /results - Display analysis results
  • GET /download-report - Download text report
  • GET /health - Health check endpoint

Production Features

  • Gunicorn WSGI server
  • Environment-based configuration
  • Structured logging
  • Error handling with fallback responses
  • Health check endpoint
  • Secure session management

Troubleshooting

Common Issues:

  • Build fails: Check requirements.txt for correct package versions
  • App won't start: Verify environment variables are set
  • OpenAI errors: Check API key validity and quota
  • File upload issues: Ensure PDF files are under 16MB

Logs:

View logs in Render dashboard under "Logs" tab for debugging.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors