Spaces:
Sleeping
Sleeping
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -26,11 +26,16 @@ MODELS = {
|
|
| 26 |
"8b": "unsloth/Llama-3.1-8B-Instruct",
|
| 27 |
}
|
| 28 |
|
|
|
|
| 29 |
SYSTEM_MESSAGE = (
|
| 30 |
"You are CodeWraith, a technical specification generator. "
|
| 31 |
"Given Python source code, produce a structured Markdown specification "
|
| 32 |
"that accurately captures all functions, classes, parameters, return types, "
|
| 33 |
-
"dependencies, and error handling patterns."
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
)
|
| 35 |
|
| 36 |
EXAMPLE_CODE = '''\
|
|
|
|
| 26 |
"8b": "unsloth/Llama-3.1-8B-Instruct",
|
| 27 |
}
|
| 28 |
|
| 29 |
+
# Duplicated here since spaces/app.py runs standalone on HF (can't import codewraith)
|
| 30 |
SYSTEM_MESSAGE = (
|
| 31 |
"You are CodeWraith, a technical specification generator. "
|
| 32 |
"Given Python source code, produce a structured Markdown specification "
|
| 33 |
"that accurately captures all functions, classes, parameters, return types, "
|
| 34 |
+
"dependencies, and error handling patterns. "
|
| 35 |
+
"Include a mermaid diagram showing the relationships between classes and functions. "
|
| 36 |
+
"Use valid mermaid syntax with proper node IDs (no spaces or special characters in IDs). "
|
| 37 |
+
"Example: ```mermaid\ngraph TD\n A[ModuleName] --> B[ClassName]\n"
|
| 38 |
+
" B --> C[method_name]\n```"
|
| 39 |
)
|
| 40 |
|
| 41 |
EXAMPLE_CODE = '''\
|