This repository contains a simple yet powerful chatbot implementation using Facebook's BlenderBot and Flask. The project demonstrates how to create an interactive conversational AI that can be accessed through a web interface.
- AI-powered conversations: Utilizes the
facebook/blenderbot-400M-distillmodel for generating human-like responses. - Web interface: Built with Flask, allowing easy interaction through a browser.
- Conversation history: Maintains context by keeping track of the conversation history.
- API endpoint: Provides a
/promptendpoint for sending messages and receiving responses.
app.py: Flask application that serves the web interface and handles API requests.LLM-chatbot.py: Standalone script for running the chatbot in a command-line interface.templates/index.html: HTML script for frontend made using Bootstrap, Bootstrap components, and Jinja.
- Install the required dependencies: pip install flask flask-cors transformers torch
- Run the Flask application: python3 app.py
- Open your browser and navigate to
http://localhost:5000to start chatting!
This project demonstrates integrating a large language model into a web application. It's suitable for learning purposes but may require additional features and optimizations for production use.
Feel free to contribute, report issues, or suggest improvements!
