Rishi-Jain-27 commited on
Commit
981bd19
·
1 Parent(s): 9ac80bb

Found a model.

Browse files
Files changed (3) hide show
  1. .gitignore +6 -0
  2. app.py +32 -0
  3. requirements.txt +6 -0
.gitignore ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ CLAUDE.md
2
+ notes-for-blog.md
3
+ .venv
4
+ venv
5
+ __pycache__
6
+ .DS_Store
app.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Goals: Off-Brand, Llama Champion, Field Notes
3
+
4
+ The plan
5
+ Create an LLM powered transpiler
6
+ Taking input code (Python, JS, etc) and translate it into Mermaid.js syntax
7
+ Gradio then interprets that visually.
8
+
9
+ The Pipeline:
10
+ 1. Input. User pastes code into a gradio.Code() block.
11
+ 2. Process. Send that code to Small Model with a specific system prompt
12
+ 3. Graph. Capture the resulting mermaid string and visualize it
13
+
14
+ - include few shot examples in system prompt
15
+ - master prompting for the system prompt and test differnet ones
16
+
17
+ Future ideas include allowing user to edit the resulting flowchart and thereby edit code
18
+
19
+ Model:
20
+ https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct-GGUF
21
+
22
+ To do
23
+ - need to create the basic gradio looks
24
+ - need to use llama.cpp
25
+ - code and pipeline
26
+
27
+ """
28
+ from huggingface_hub import hf_hub_download
29
+ from llama_cpp import Llama
30
+
31
+
32
+
requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ # Pre-built CPU wheels for llama-cpp-python (avoids compiling from source on Spaces)
2
+ --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
3
+ llama-cpp-python
4
+
5
+ gradio
6
+ huggingface_hub