This project is a Personal AI Chatbot that allows users to interact with an AI in real time. Powered by Hugging Face’s DialoGPT-medium model, Flask backend, and a ReactJS frontend (built with Vite), this chatbot is responsive, scalable, and perfect for exploring conversational AI.
- Real-Time Conversations: Responds to user inputs instantly using DialoGPT.
- Clean User Interface: Built with ReactJS for a modern and responsive chat experience.
- Scalable Backend: Flask handles API requests and processes AI responses.
- ReactJS with Vite for fast development and HMR.
- Axios for API communication.
- Flask for serving the API.
- Hugging Face’s Transformers library for AI model inference.
- DialoGPT-medium from Hugging Face for conversational AI.
Start by cloning the repository from GitHub:
git clone https://github.com/allanninal/personal-ai-chatbot.git
cd personal-ai-chatbot
-
Navigate to the
backend
folder:cd backend
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # Linux/Mac venv\Scripts\activate # Windows
-
Install the dependencies from
requirements.txt
:pip install -r requirements.txt
-
Run the Flask server:
python app.py
-
Navigate to the
frontend
folder:cd frontend
-
Install dependencies:
npm install
-
Run the React development server:
npm run dev
- Start Chatting: Open the app in your browser at
http://localhost:5173
. - Real-Time Responses: Type a message in the chat input, and the chatbot will respond instantly.
- Explore Conversations: Continue chatting with the AI to explore its capabilities.
- Frontend (ReactJS): Provides a clean interface for user interaction.
- Backend (Flask): Processes user inputs and generates AI responses using Hugging Face’s DialoGPT-medium model.
- AI Model (DialoGPT-medium): Converts user inputs into context-aware, human-like responses.
- Conversation History: Add persistent storage to maintain and display chat history.
- Fine-Tuning the Model: Train the chatbot with custom datasets for specific use cases.
- Voice Interaction: Incorporate speech-to-text and text-to-speech functionality for a voice-driven chatbot experience.
- Advanced UI Styling: Enhance the frontend using CSS frameworks like Tailwind CSS or Material-UI.
- Deployment: Host the chatbot on platforms like AWS, Heroku, or Vercel.
- Alternative Models: Explore other conversational AI models:
- OpenAI’s GPT-3.5 for advanced and nuanced responses.
- BlenderBot for long-form conversations.
- T5 (Text-to-Text Transfer Transformer) for versatile NLP tasks.
This project is licensed under the MIT License. See the LICENSE
file for details.
If you find this project helpful, consider supporting me on Ko-fi:
ko-fi.com/allanninal