Skip to content

YoussefMoHlemyAlpha/ChatBot-to-Write-Python-Code-RAG-Application-LLM-LLaMA-2-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍 AI Python Tutor (Local RAG · LLaMA-2)

An interactive Python coding tutor powered by local RAG (Retrieval-Augmented Generation).
Upload your own tutorials (PDF, TXT, or Markdown), and ask coding questions.
The app retrieves relevant snippets, feeds them to a language model, and returns clear, runnable Python code with inline comments.


✨ Features

  • 📂 Reads and indexes local .pdf, .txt, and .md files.
  • 🔎 Fast and efficient semantic search with FAISS.
  • 🧠 Uses HuggingFace embeddings (all-mpnet-base-v2) for vectorization.
  • 🤖 LLM-powered tutor (supports LLaMA-2, Ollama, or OpenAI/Gemini).
  • 🐍 Always returns complete runnable Python code with comments.
  • 📚 Expandable source panel to see where answers come from.
  • 🎨 Clean Streamlit UI with background customization.

🚀 Getting Started

1️⃣ Clone the repo

git clone https://github.com/yourusername/ai-python-tutor.git
cd ai-python-tutor
python -m venv venv
source venv/bin/activate   # Linux/Mac
venv\Scripts\activate      # Windows
streamlit run app.py

⚙️ Configuration

Dataset folder → set in the sidebar.

Temperature → controls creativity (0.0 = precise, 1.0 = more creative).

Build/Rebuild Knowledge Base → (re)creates FAISS vector store.

About

AI Python Tutor (Local RAG) is a Streamlit-based coding assistant powered by local Retrieval-Augmented Generation (RAG).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages