GramLearn Installation Guide
Welcome to the installation guide for GramLearn the Conversational Grammar and English Learning Chatbot. This guide will walk you through the steps required to set up the chatbot on your local machine for development and testing purposes.
Before you begin, ensure you have met the following requirements:
- Python 3.x installed on your system.
pippackage manager installed.- Node.js and npm installed for the frontend setup.
- A compatible operating system (Windows/Linux/macOS).
Follow these steps to install and set up the project:
Clone the project repository to your local machine using Git:
git clone https://github.com/sohamw03/DP_NLP.gitNavigate to the backend directory and set up the Flask server:
cd backendCreate a virtual environment (optional but recommended):
python3 -m venv venvActivate the virtual environment:
- Windows:
venv\Scripts\activate
- Linux/macOS:
source venv/bin/activate
Install the required Python dependencies:
pip install -r requirements.txtNavigate to the frontend directory:
cd ..Install Node.js dependencies:
yarn installCreate a .env file in the backend directory and set the following environment variables:
FLASK_APP=app.py
FLASK_ENV=development
Start the Flask server:
flask runStart the Next.js frontend:
yarn devcurl -fsSL https://ollama.com/install.sh | sh- Download the gemma:2b model.
ollama pull gemma:2bRun Ollama
ollama run path/to/gemma_2b.ptInteract with Model
Use Ollama commands (see docs: https://github.com/ollama/ollama) for querying and interacting with the model.
Open your web browser and navigate to http://localhost:3000 to access the chatbot interface.