metadata
title: AI Chatbot with Memory
emoji: 💬
colorFrom: indigo
colorTo: blue
sdk: docker
app_file: app.py
hardware: cpu-basic
pinned: false
AI Chatbot with Session Memory
This is a simple AI Chatbot application built with Flask, Sentence-Transformers for memory retrieval, and Groq for language model inference.
It uses Flask sessions to maintain conversation memory relevant to each user's browser session.
Developed by Dhiraj Surve and Swaroop Ingavale.
Features:
- Session-Based Memory: Recalls previous conversation turns within the same browser session.
- Semantic Retrieval: Uses embeddings to find relevant past messages based on the current input.
- Groq Integration: Leverages Groq's fast inference for AI responses.
- Simple Web UI: Built with Flask, HTML, CSS, and JavaScript.
Setup & Deployment (Hugging Face Spaces Docker):
- Put the project files (
app.py,requirements.txt,Dockerfile,templates/,static/) in a directory. - Create a new Hugging Face Space with the Docker SDK.
- Clone the empty Space repository provided by Hugging Face.
- Copy your local project files into the cloned repository directory.
- Add, commit, and push all files (including this
README.md) to the Space's Git repository. - Add your
GROQ_API_KEYand a secureSECRET_KEYas Space secrets in the Space settings on the Hugging Face website. - Hugging Face will automatically build the Docker image and deploy the application.
Files:
app.py: Flask backend with chatbot logic.requirements.txt: Python dependencies.Dockerfile: Defines the Docker image build process.templates/index.html: The main chat interface HTML.static/style.css: Styling for the UI.static/script.js: Frontend logic for sending messages and updating the UI.