Spaces:
Sleeping
A newer version of the Gradio SDK is available:
5.21.0
title: AI Tutor
emoji: π‘
colorFrom: blue
colorTo: indigo
sdk: gradio
sdk_version: 4.44.1
app_file: app.py
pinned: false
Towards AI π€: An AI Question-Answering Bot
Overview
Towards AI π€ is a question-answering bot designed to assist students with queries related to Artificial Intelligence (AI), Machine Learning (ML), and Deep Learning (DL). It leverages Large Language Models (LLMs) and Retrieval-Augmented Generation (RAG) techniques to provide insightful answers, utilizing a vector database for efficient retrieval of knowledge.
Features
- AI, ML, and DL question-answering capabilities.
- Integration with ChromaDB for persistent storage.
- Utilizes OpenAI's models for generating responses.
- Gradio interface for easy interaction.
- Memory management for maintaining conversation context.
Requirements
Make sure you have installed the dependencies from requirements.txt file.
pip install -r requirements.txt
Setup
Clone the Repository
git clone https://huggingface.co/yourusername/towards-ai cd towards-ai
Environment Variables Create a .env file in the project root and set the following variables:
OPENAI_API_KEY= LOGFIRE_TOKEN= COHERE_API_KEY= MONGODB_URI= DB_NAME=ai_tutor_knowledge
Download the Vector Database
The bot requires a pre-trained vector database. If it doesn't exist locally, it will automatically download it from Hugging Face Hub when you run the code.
Usage
To start the chatbot, run the following command:
python app.py
Gradio Interface
Once the application is running, you can access the chatbot interface at http://localhost:7860.
Interacting with the Bot
You can ask the bot any question related to AI, ML, or DL. The bot is designed to provide clear, complete answers based on its knowledge base.