Spaces:
Runtime error
Runtime error
Madhu Chitikela commited on
Commit Β·
3da9425
1
Parent(s): fc63ff9
π€ Add README, update .gitignore β AI Code Debugger Agent
Browse files- .gitignore +19 -1
- README.md +78 -0
.gitignore
CHANGED
|
@@ -1,8 +1,26 @@
|
|
|
|
|
| 1 |
.env
|
|
|
|
|
|
|
| 2 |
venv/
|
| 3 |
__pycache__/
|
| 4 |
*.pyc
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
test_out.txt
|
| 7 |
test.py
|
| 8 |
t.py
|
|
|
|
| 1 |
+
# API Keys β NEVER push these
|
| 2 |
.env
|
| 3 |
+
|
| 4 |
+
# Python
|
| 5 |
venv/
|
| 6 |
__pycache__/
|
| 7 |
*.pyc
|
| 8 |
+
*.pyo
|
| 9 |
+
*.pyd
|
| 10 |
+
.Python
|
| 11 |
+
|
| 12 |
+
# Database
|
| 13 |
+
*.db
|
| 14 |
+
*.sqlite
|
| 15 |
+
|
| 16 |
+
# VS Code
|
| 17 |
+
.vscode/
|
| 18 |
+
|
| 19 |
+
# OS
|
| 20 |
+
.DS_Store
|
| 21 |
+
Thumbs.db
|
| 22 |
+
|
| 23 |
+
# Test files
|
| 24 |
test_out.txt
|
| 25 |
test.py
|
| 26 |
t.py
|
README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# π€ AI Code Debugger Agent
|
| 2 |
+
|
| 3 |
+
> Autonomous AI agent that fixes broken Python code β no human needed.
|
| 4 |
+
|
| 5 |
+

|
| 6 |
+

|
| 7 |
+

|
| 8 |
+

|
| 9 |
+
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
## π― What It Does
|
| 13 |
+
|
| 14 |
+
Paste broken code + error message β AI analyzes, fixes, and explains β automatically.
|
| 15 |
+
|
| 16 |
+
## βοΈ Tech Stack
|
| 17 |
+
|
| 18 |
+
| Layer | Technology |
|
| 19 |
+
|---|---|
|
| 20 |
+
| LLM | Groq LLaMA 3.3 + Gemini Fallback |
|
| 21 |
+
| Framework | LangChain |
|
| 22 |
+
| UI | Gradio |
|
| 23 |
+
| Database | SQLite |
|
| 24 |
+
| Deployment | HuggingFace Spaces |
|
| 25 |
+
|
| 26 |
+
## π How to Run Locally
|
| 27 |
+
|
| 28 |
+
```bash
|
| 29 |
+
git clone https://github.com/MadhuChitikela/ai-code-debugger-agent
|
| 30 |
+
cd ai-code-debugger-agent
|
| 31 |
+
pip install -r requirements.txt
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
Create `.env` file:
|
| 35 |
+
```
|
| 36 |
+
GROQ_API_KEY=your_key_here
|
| 37 |
+
GEMINI_API_KEY=your_key_here
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
Run:
|
| 41 |
+
```bash
|
| 42 |
+
python main.py
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
## π‘ Example
|
| 46 |
+
|
| 47 |
+
Input:
|
| 48 |
+
```python
|
| 49 |
+
def greet():
|
| 50 |
+
print(massage)
|
| 51 |
+
greet()
|
| 52 |
+
```
|
| 53 |
+
Error: `NameError: name 'massage' is not defined`
|
| 54 |
+
|
| 55 |
+
Output: Fixed code + explanation β
|
| 56 |
+
|
| 57 |
+
## ποΈ Architecture
|
| 58 |
+
|
| 59 |
+
```
|
| 60 |
+
User Input (broken code + error)
|
| 61 |
+
β
|
| 62 |
+
Multi-Model LLM
|
| 63 |
+
(Groq β Gemini fallback)
|
| 64 |
+
β
|
| 65 |
+
Fix Generated
|
| 66 |
+
β
|
| 67 |
+
SQLite Logged
|
| 68 |
+
β
|
| 69 |
+
Result Displayed
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
## π Features
|
| 73 |
+
|
| 74 |
+
- β
Auto fixes Python + JavaScript errors
|
| 75 |
+
- β
Multi-model fallback (7 models across 2 providers)
|
| 76 |
+
- β
Session history + analytics dashboard
|
| 77 |
+
- β
Professional dark UI
|
| 78 |
+
- β
All sessions logged to SQLite
|