DhirajBot / README.md
swaroop77's picture
readme
653421e verified
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):

  1. Put the project files (app.py, requirements.txt, Dockerfile, templates/, static/) in a directory.
  2. Create a new Hugging Face Space with the Docker SDK.
  3. Clone the empty Space repository provided by Hugging Face.
  4. Copy your local project files into the cloned repository directory.
  5. Add, commit, and push all files (including this README.md) to the Space's Git repository.
  6. Add your GROQ_API_KEY and a secure SECRET_KEY as Space secrets in the Space settings on the Hugging Face website.
  7. 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.