Flask API server for generating personalized financial aid requests for Coursera courses.
- Smart Caching System: Scraped course pages are cached in
static/scraps/directory to avoid redundant web scraping and improve response times - AI-Powered Generation: Uses Google Generative AI to generate personalized financial aid requests
- Course Scraping: Automatically scrapes Coursera course pages to extract course information and specialization details
- MongoDB Integration: Stores and retrieves course data from MongoDB Atlas
- Response Regeneration: Allows regenerating financial aid requests with the same context
GET /- Health check endpointGET /getAllCourses- Retrieve all courses from databasePOST /submit- Submit course information and scrape course pagePOST /GetPrompt- Generate personalized financial aid request promptsPOST /regenerate- Regenerate a financial aid request
-
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile with:MONGO_PASS=your_mongodb_password OPENAI_KEY=your_google_genai_api_key OPENAI_KEY2=your_secondary_api_key (Use the same key; key2 is backup) -
Run the application:
flask run
API Server: Visit server here