Sahayak AI is a recommendation system built using React (with Vite) on the frontend and Flask with CORS on the backend. The system recommends government schemes to users based on their input keywords. It uses web scraping techniques to provide real-time information on schemes.
- RAG based application: Uses vectorization and performs cosine similarity on the recieved prompt,
- Reduced time: Due to embedding already stored in .pkl file
- Recommendation System: Provides tailored scheme recommendations based on user input.
- Web Scraping: Fetches real-time scheme data using Selenium and BeautifulSoup.
- Flask API and Flask CORS: Handles backend operations and integrates with the recommendation engine.
- React Frontend: Built using Vite for fast and efficient development.
- React (with Vite)
- Flask
- Flask-CORS
- Pandas (for data handling)
- scikit-learn (for TF-IDF and cosine similarity)
- Selenium (for web scraping)
- BeautifulSoup (for HTML parsing)
Ensure you have the following installed:
- Node.js (for React frontend)
- Python 3.8+ (for Flask backend)
- Google Chrome (for Selenium web scraping)
git clone https://github.com/your-username/sahayak-ai.git
cd sahayak-ai
-
Navigate to the backend directory:
cd backend
-
Create a virtual environment and activate it:
python3 -m venv venv source venv/bin/activate # For Windows: venv\Scripts\activate
-
Install required Python dependencies:
pip install requirements
-
Start the Flask server:
flask run --host=0.0.0.0 --port=5000
-
Navigate to the frontend directory:
cd ../frontend
-
Install Node.js dependencies:
npm install
-
Start the Vite development server:
npm run dev
The frontend will be available at http://localhost:3000
and the backend at http://localhost:5000
.
- Open the frontend and enter keywords in the input field.
- The Flask backend will process the request and provide scheme recommendations.
- The web scraper fetches real-time scheme information from the internet.
-
Description: Accepts user keywords and returns a list of recommended schemes.
-
Request:
{ "keywords": "scholarship" }
-
Response:
{ "recommendations": [ "Scheme 1 details", "Scheme 2 details", "Scheme 3 details" ] }
This project is licensed under the MIT License.
This `README.md` includes the basic structure and usage instructions for both the frontend (React with Vite) and backend (Flask). Feel free to customize as per your requirements!