A web-based chatbot powered by the Groq API using Flask. Chat with a friendly AI through a clean, responsive UI similar to ChatGPT.
Interactive web-based chat interface
Maintains recent chat history
Reset chat functionality
Short, clear AI responses
Uses Groq API for AI-based responses
Responsive UI with smooth scrolling
Backend: Python, Flask
Frontend: HTML, CSS, JavaScript
Libraries: Flask-CORS, Requests, Python-Dotenv, Groq
Server: Gunicorn (for production)
Clone the project
git clone https://github.com/EmaanSafdar/Groq-Chatbot.git
Go to the project directory
cd Groq-ChatbotInstall dependencies
pip install -r requirements.txtCreate a virtual environment
python -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activateCreate a .env file in the project root and add your Groq API key:
GROQ_API_KEY=your_groq_api_key_herepython chatbot.pyOpen your browser at http://127.0.0.1:5000 to use the chatbot.
To deploy this project run Make sure your requirements.txt includes:
flask
flask-cors
gunicorn
requests
python-dotenv
groq
Use this start command on Render or similar platforms:
gunicorn chatbot:appModuleNotFoundError: Add missing libraries to requirements.txt and redeploy.
Status 127 / gunicorn not found: Make sure gunicorn is in requirements.txt.
Groq API key errors: Ensure .env exists and contains GROQ_API_KEY.