Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -16,6 +16,7 @@ MODEL_ID_MAP = {
|
|
16 |
"(IBM)Granite3.3-2B": 'granite3.3:2b',
|
17 |
"(Meta)Llama3.2-3B-Instruct": 'hf.co/bartowski/Llama-3.2-3B-Instruct-GGUF:Q4_K_M', # OK speed with CPU
|
18 |
"(ιΏιεε)Qwen3-4B-Instruct-2507": 'hf.co/bartowski/Qwen_Qwen3-4B-Instruct-2507-GGUF:Q4_K_M',
|
|
|
19 |
#"(ιΏιεε)Qwen3-4B-Thinking-2507": 'hf.co/bartowski/Qwen_Qwen3-4B-Thinking-2507-GGUF:Q4_K_M',
|
20 |
#"(Google)Gemma3n-e2b-it": 'gemma3n:e2b-it-q4_K_M',
|
21 |
#"(Tencent)ζ··ε
-1.8B-Instruct":'hf.co/bartowski/tencent_Hunyuan-1.8B-Instruct-GGUF:Q4_K_M',
|
@@ -84,7 +85,28 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="blue", secondary_hue="neutra
|
|
84 |
"Friendly & Conversational":"Respond in a warm, friendly, and engaging tone. Use natural language and offer helpful suggestions. Keep responses concise but personable.",
|
85 |
"Professional & Formal":"Maintain a formal and professional tone. Use precise language, avoid slang, and ensure responses are suitable for business or academic contexts.",
|
86 |
"Elon Musk style":"You must chat in Elon Musk style!",
|
87 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
}
|
89 |
|
90 |
system_prompt_selector = gr.Radio(
|
|
|
16 |
"(IBM)Granite3.3-2B": 'granite3.3:2b',
|
17 |
"(Meta)Llama3.2-3B-Instruct": 'hf.co/bartowski/Llama-3.2-3B-Instruct-GGUF:Q4_K_M', # OK speed with CPU
|
18 |
"(ιΏιεε)Qwen3-4B-Instruct-2507": 'hf.co/bartowski/Qwen_Qwen3-4B-Instruct-2507-GGUF:Q4_K_M',
|
19 |
+
"(ιΏιεε)Qwen3-Coder-30B-A3B-Instruct-1M": 'hf.co/unsloth/Qwen3-Coder-30B-A3B-Instruct-1M-GGUF:Q4_K_M',
|
20 |
#"(ιΏιεε)Qwen3-4B-Thinking-2507": 'hf.co/bartowski/Qwen_Qwen3-4B-Thinking-2507-GGUF:Q4_K_M',
|
21 |
#"(Google)Gemma3n-e2b-it": 'gemma3n:e2b-it-q4_K_M',
|
22 |
#"(Tencent)ζ··ε
-1.8B-Instruct":'hf.co/bartowski/tencent_Hunyuan-1.8B-Instruct-GGUF:Q4_K_M',
|
|
|
85 |
"Friendly & Conversational":"Respond in a warm, friendly, and engaging tone. Use natural language and offer helpful suggestions. Keep responses concise but personable.",
|
86 |
"Professional & Formal":"Maintain a formal and professional tone. Use precise language, avoid slang, and ensure responses are suitable for business or academic contexts.",
|
87 |
"Elon Musk style":"You must chat in Elon Musk style!",
|
88 |
+
"Test2(Auto TC/EN)":"Always detect the user's input language and respond in that same language. Do not translate unless explicitly requested. Answer everything in simple, smart, relevant and accurate style. No chatty!",
|
89 |
+
"Coder":"""
|
90 |
+
You are a highly capable coding assistant specialized in software development, algorithms, and debugging. Your responses must be accurate, efficient, and tailored to the user's request. Always follow these principles:
|
91 |
+
1. Use clear, well-commented code.
|
92 |
+
2. Prioritize readability and best practices.
|
93 |
+
3. When asked to explain, provide concise, step-by-step reasoning.
|
94 |
+
4. When asked to generate code, include input/output examples if relevant.
|
95 |
+
5. If the user provides buggy code, identify the issue and suggest a fix.
|
96 |
+
6. If multiple solutions exist, briefly compare them and recommend the best.
|
97 |
+
7. Always respect the specified programming language, libraries, and constraints.
|
98 |
+
8. Never make assumptions beyond the userβs instructions unless explicitly asked.
|
99 |
+
9. If the task is ambiguous, ask clarifying questions before proceeding.
|
100 |
+
10. Avoid unnecessary boilerplate unless requested.
|
101 |
+
11. Use only open-source and free resources, libraries, and APIs. Do not suggest or rely on paid, proprietary, or license-restricted tools unless explicitly requested.
|
102 |
+
12. You code shall be fine to run on Colab or Kaggle.
|
103 |
+
13. Always include inner comments for user learning.
|
104 |
+
14. Always provide installation and operation steps.
|
105 |
+
|
106 |
+
You support multiple languages including Python, JavaScript, TypeScript, C++, Java, Go, Rust, and Bash. You can also assist with frameworks like React, Node.js, Django, Flask, and more.
|
107 |
+
|
108 |
+
Your goal is to help the user write better code, faster, and deepen their understanding of programming concepts.
|
109 |
+
"""
|
110 |
}
|
111 |
|
112 |
system_prompt_selector = gr.Radio(
|