Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,6 +13,7 @@ import ollama
|
|
| 13 |
|
| 14 |
# Model from run.sh
|
| 15 |
MODEL_ID_MAP = {
|
|
|
|
| 16 |
"Qwen3-4B-Instruct-2507": 'hf.co/bartowski/Qwen_Qwen3-4B-Instruct-2507-GGUF:Q4_K_M',
|
| 17 |
#"Qwen3-4B-Thinking-2507": 'hf.co/bartowski/Qwen_Qwen3-4B-Thinking-2507-GGUF:Q4_K_M',
|
| 18 |
"SmolLM2-360M": 'smollm2:360m-instruct-q5_K_M',
|
|
@@ -76,13 +77,14 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="blue", secondary_hue="neutra
|
|
| 76 |
|
| 77 |
# --- New: System Prompt Options ---
|
| 78 |
SYSTEM_PROMPT_OPTIONS = {
|
| 79 |
-
"
|
| 80 |
"繁體中文回答":"無論如何,必須使用標準繁體中文回答. Answer everything in simple, smart, relevant and accurate style. No chatty!",
|
| 81 |
"简体中文回答":"无论如何,必须使用标准简体中文回答. Answer everything in simple, smart, relevant and accurate style. No chatty!",
|
| 82 |
"English Caht":"You must reply by English. Answer everything in simple, smart, relevant and accurate style. No chatty!",
|
| 83 |
-
"Friendly & Conversational":
|
| 84 |
-
"Professional & Formal":
|
| 85 |
-
"Elon Musk style":
|
|
|
|
| 86 |
}
|
| 87 |
|
| 88 |
system_prompt_selector = gr.Radio(
|
|
|
|
| 13 |
|
| 14 |
# Model from run.sh
|
| 15 |
MODEL_ID_MAP = {
|
| 16 |
+
"Tencent混元1.8B":'hf.co/bartowski/tencent_Hunyuan-1.8B-Instruct-GGUF:Q4_K_M',
|
| 17 |
"Qwen3-4B-Instruct-2507": 'hf.co/bartowski/Qwen_Qwen3-4B-Instruct-2507-GGUF:Q4_K_M',
|
| 18 |
#"Qwen3-4B-Thinking-2507": 'hf.co/bartowski/Qwen_Qwen3-4B-Thinking-2507-GGUF:Q4_K_M',
|
| 19 |
"SmolLM2-360M": 'smollm2:360m-instruct-q5_K_M',
|
|
|
|
| 77 |
|
| 78 |
# --- New: System Prompt Options ---
|
| 79 |
SYSTEM_PROMPT_OPTIONS = {
|
| 80 |
+
"Default(Auto TC/EN)": DEFAULT_SYSTEM_PROMPT,
|
| 81 |
"繁體中文回答":"無論如何,必須使用標準繁體中文回答. Answer everything in simple, smart, relevant and accurate style. No chatty!",
|
| 82 |
"简体中文回答":"无论如何,必须使用标准简体中文回答. Answer everything in simple, smart, relevant and accurate style. No chatty!",
|
| 83 |
"English Caht":"You must reply by English. Answer everything in simple, smart, relevant and accurate style. No chatty!",
|
| 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 |
+
"Test":"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!"
|
| 88 |
}
|
| 89 |
|
| 90 |
system_prompt_selector = gr.Radio(
|