| title: CodeMentor - Programming Tutor Chatbot | |
| emoji: π¨βπ» | |
| colorFrom: blue | |
| colorTo: green | |
| sdk: gradio | |
| sdk_version: "4.0.0" | |
| app_file: app.py | |
| pinned: false | |
| # CodeMentor - Programming Tutor Chatbot | |
| A custom AI chatbot built with Gradio and GROQ API that serves as a personal programming tutor. | |
| ## π Features | |
| - **Programming Tutor Personality**: Patient, encouraging, and knowledgeable | |
| - **Multiple AI Models**: Choose between Llama 3 8B, 70B, or Mixtral | |
| - **Language-Specific Focus**: Get tailored examples for Python, JavaScript, Java, etc. | |
| - **Customizable Responses**: Adjust creativity and response length | |
| - **Interactive UI**: Clickable example questions | |
| - **Code Formatting**: Proper syntax highlighting for code examples | |
| ## π οΈ Setup Instructions | |
| ### 1. Get GROQ API Key | |
| 1. Visit [https://console.groq.com](https://console.groq.com) | |
| 2. Sign up and get your free API key | |
| 3. Copy the key (starts with `gsk_`) | |
| ### 2. Local Deployment | |
| ```bash | |
| # Clone or create project | |
| mkdir programming-tutor-chatbot | |
| cd programming-tutor-chatbot | |
| # Create virtual environment (optional but recommended) | |
| python -m venv venv | |
| source venv/bin/activate # On Windows: venv\Scripts\activate | |
| # Install dependencies | |
| pip install -r requirements.txt | |
| # Set environment variable (Windows: use set instead of export) | |
| export GROQ_API_KEY="your-api-key-here" | |
| # Run the application | |
| python app.py |