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.
pip
package 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.git
Navigate to the backend directory and set up the Flask server:
cd backend
Create a virtual environment (optional but recommended):
python3 -m venv venv
Activate the virtual environment:
- Windows:
venv\Scripts\activate
- Linux/macOS:
source venv/bin/activate
Install the required Python dependencies:
pip install -r requirements.txt
Navigate to the frontend directory:
cd ..
Install Node.js dependencies:
yarn install
Create 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 run
Start the Next.js frontend:
yarn dev
curl -fsSL https://ollama.com/install.sh | sh
- Download the gemma:2b model.
ollama pull gemma:2b
Run Ollama
ollama run path/to/gemma_2b.pt
Interact 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.