Jimmy the Robot is a friendly chatbot designed to assist users with their queries. This project consists of a Flask-powered backend for processing chatbot logic and a React-based frontend for an interactive user interface. The backend is also containerized using Docker for easy deployment.
- Interactive Chat Interface: User-friendly React frontend for seamless conversations.
- Flask Backend: Robust backend to handle chatbot logic and responses.
- Conversational Flow: Demonstrates basic conversational capabilities (greeting, asking about well-being).
- Dockerized Backend: Easy deployment and portability of the Flask application using Docker.
- Backend:
- Python 3.x
- Flask
- Gemini API
- Frontend:
- React
- JavaScript
- HTML/CSS
- Deployment/Containerization:
- Docker
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.
Before you begin, ensure you have the following installed:
- Python 3.x: Download Python
- Node.js & npm (or yarn): Download Node.js (npm is included)
- Docker Desktop: Download Docker Desktop (if you plan to use Docker)
-
Navigate to the backend directory:
cd chat-bot-with-gemini/backend -
Create a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Create .env file with Gemini API Key:
Go to Google Ai Studio and genarate API key and create .env file in the project and add this in your .env file
API_KEY="add api key here". -
Run the Flask application:
python3 main.py
The backend will typically run on
http://127.0.0.1:8000.
-
Navigate to the frontend directory:
cd chat-bot-with-gemini/frontend -
Install dependencies:
npm install
-
Run the React application:
npm run dev
If you prefer to run the backend using Docker:
-
Navigate to the backend directory:
cd chat-bot-with-gemini/backend -
Build the Docker image:
docker build -t jimmy-the-robot-backend:tag . -
Run the Docker container:
docker run -p 8000:8000 jimmy-the-robot-backend
- Ensure both the Flask backend (either directly or via Docker) and the React frontend are running.
- Open your web browser and navigate to
http://localhost:5173. - You will see the "Jimmy the Robot" chat interface. Type your messages in the input field and click "Send" or press Enter to interact with Jimmy.
This project is licensed under the MIT License - see the LICENSE file for details.