sudiptaverse commited on
Commit
918a19e
Β·
verified Β·
1 Parent(s): 0ca2458

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +75 -5
README.md CHANGED
@@ -1,12 +1,82 @@
1
  ---
2
  title: DevDeCode
3
- emoji: πŸ’»
4
- colorFrom: blue
5
- colorTo: gray
6
  sdk: gradio
7
- sdk_version: 5.32.0
8
  app_file: app.py
9
  pinned: false
10
  ---
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  title: DevDeCode
3
+ emoji: πŸ’‘
4
+ colorFrom: indigo
5
+ colorTo: purple # Changed from violet to purple (valid color)
6
  sdk: gradio
7
+ sdk_version: "4.27.0"
8
  app_file: app.py
9
  pinned: false
10
  ---
11
 
12
+ # πŸ’‘ DevDeCode: Explain Code with LLM
13
+
14
+ 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.
15
+
16
+ > 🧠 Built using Hugging Face Transformers, LangChain, and Gradio.
17
+
18
+ ---
19
+
20
+ ## πŸš€ Features
21
+
22
+ - πŸ“œ Explain small code snippets using LLM
23
+ - 🧩 Supports languages like Java, Python (others can be added)
24
+ - 🌐 Web-based interface via Gradio
25
+ - πŸ”„ Can be extended with memory & history tracking
26
+
27
+ ---
28
+
29
+ ## πŸ›  Tech Stack
30
+
31
+ | Tool / Library | Purpose |
32
+ |------------------------|----------------------------------|
33
+ | `transformers` | Load & run Gemma 2B |
34
+ | `langchain` | LLM integration & prompt logic |
35
+ | `huggingface_hub` | Auth & model access |
36
+ | `gradio` | Frontend UI |
37
+ | `torch` | Model backend (PyTorch) |
38
+ | `langchain-huggingface`| LangChain-HF wrapper |
39
+
40
+ ---
41
+
42
+ ## πŸ§ͺ How to Use
43
+
44
+ Just paste a code snippet into the textbox and click submit. The model will explain what the code does.
45
+
46
+ ⚠️ **Note:** The response time may vary depending on your GPU and input length. Model is gated β€” ensure you're authenticated.
47
+
48
+ ---
49
+
50
+ ## 🧩 Example Prompt
51
+
52
+ public class Factorial {
53
+ public static int factorial(int n) {
54
+ if (n <= 1) return 1;
55
+ return n * factorial(n - 1);
56
+ }
57
+ }
58
+
59
+
60
+ πŸ‘† Get a clear explanation of recursion, factorial logic, and base conditions.
61
+
62
+ ---
63
+
64
+ ## πŸ” Hugging Face Token
65
+
66
+ This model uses a gated Google Gemma 2B model. Make sure your Hugging Face token is set via:
67
+
68
+ - Hugging Face Spaces secrets (`HF_TOKEN`)
69
+ - Or via `huggingface-cli login` locally.
70
+
71
+ ---
72
+
73
+ ## 🧠 Coming Soon
74
+
75
+ - Memory / Chat history support
76
+ - Upload files for batch code analysis
77
+ - Multi-language explanation support
78
+
79
+ ---
80
+
81
+ πŸ‘¨β€πŸ’» Created by [@itzsudipta](https://huggingface.co/sudiptaverse)
82
+ πŸ§ͺ Try it now: [https://huggingface.co/spaces/sudiptaverse/DataSynth](https://huggingface.co/spaces/sudiptaverse/DevDeCode)