DevDeCode / README.md
sudiptaverse's picture
Update README.md
709432f verified
---
title: DevDeCode
emoji: πŸ’‘
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 5.32.0
app_file: app.py
pinned: false
---
# πŸ’‘ DevDeCode: Explain Code with LLM
DevDeCode is a simple but powerful code explanation tool powered by **Google's Gemma 2B** and **LangChain**. Paste any code snippet (Java, Python, etc.), and get a natural-language explanation to help you understand what it does.
> 🧠 Built using Hugging Face Transformers, LangChain, and Gradio.
---
## πŸš€ Features
- πŸ“œ Explain small code snippets using LLM
- 🧩 Supports languages like Java, Python (others can be added)
- 🌐 Web-based interface via Gradio
- πŸ”„ Can be extended with memory & history tracking
---
## πŸ›  Tech Stack
| Tool / Library | Purpose |
|------------------------|----------------------------------|
| `transformers` | Load & run Gemma 2B |
| `langchain` | LLM integration & prompt logic |
| `huggingface_hub` | Auth & model access |
| `gradio` | Frontend UI |
| `torch` | Model backend (PyTorch) |
| `langchain-huggingface`| LangChain-HF wrapper |
---
## πŸ§ͺ How to Use
Just paste a code snippet into the textbox and click submit. The model will explain what the code does.
⚠️ **Note:** The response time may vary depending on your GPU and input length. Model is gated β€” ensure you're authenticated.
---
## 🧩 Example Prompt
public class Factorial {
public static int factorial(int n) {
if (n <= 1) return 1;
return n * factorial(n - 1);
}
}
πŸ‘† Get a clear explanation of recursion, factorial logic, and base conditions.
---
## πŸ” Hugging Face Token
This model uses a gated Google Gemma 2B model. Make sure your Hugging Face token is set via:
- Hugging Face Spaces secrets (`HF_TOKEN`)
- Or via `huggingface-cli login` locally.
---
## 🧠 Coming Soon
- Memory / Chat history support
- Upload files for batch code analysis
- Multi-language explanation support
---
πŸ‘¨β€πŸ’» Created by [@itzsudipta](https://huggingface.co/sudiptaverse)
πŸ§ͺ Try it now: [https://huggingface.co/spaces/sudiptaverse/DataSynth](https://huggingface.co/spaces/sudiptaverse/DevDeCode)