baconnier commited on
Commit
e16ac22
·
verified ·
1 Parent(s): 92682a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -15,7 +15,7 @@ llm = None
15
  llm_model = None
16
  hf_hub_download(repo_id="baconnier/Napoleon_24B_V0.2-Q8_0-GGUF", filename="napoleon_24b_v0.2-q8_0.gguf", local_dir = "./models")
17
  hf_hub_download(repo_id="baconnier/Napoleon_24B_V0.1-Q8_0-GGUF", filename="napoleon_24b_v0.1-q8_0.gguf", local_dir = "./models")
18
- hf_hub_download(repo_id="baconnier/Napoleon_24B_R1_V0.0-Q8_0-GGUF", filename="napoleon_24b_r1_v0.0-q8_0.gguf", local_dir = "./models")
19
 
20
 
21
  @spaces.GPU(duration=60)
@@ -45,7 +45,8 @@ def respond(
45
 
46
  agent = LlamaCppAgent(
47
  provider,
48
- system_prompt="You are Dolphin, an AI assistant that helps humanity, trained to specialize in reasoning and first-principles analysis. When responding, always format your replies using <think>{reasoning}</think>{answer}. Use at least 6 reasoning steps and perform a root cause analysis before answering. However, if the answer is very easy and requires little thought, you may leave the <think></think> block empty. Your responses should be detailed, structured with rich Markdown formatting, and engaging with emojis. Be extensive in your explanations, just as the greatest scientific minds would be. Always reason through the problem first, unless it's trivial, in which case you may answer directly.",
 
49
  predefined_messages_formatter_type=MessagesFormatterType.CHATML,
50
  debug_output=True
51
  )
@@ -85,7 +86,7 @@ demo = gr.ChatInterface(
85
  gr.Dropdown([
86
  'napoleon_24b_v0.2-q8_0.gguf',
87
  'napoleon_24b_v0.1-q8_0.gguf',
88
- 'napoleon_24b_r1_v0.0-q8_0.gguf',
89
  ], value="napoleon_24b_v0.2-q8_0.gguf", label="Model"),
90
  gr.Slider(minimum=1, maximum=8192, value=8192, step=1, label="Max tokens"),
91
  gr.Slider(minimum=0.05, maximum=4.0, value=0.6, step=0.1, label="Temperature"),
 
15
  llm_model = None
16
  hf_hub_download(repo_id="baconnier/Napoleon_24B_V0.2-Q8_0-GGUF", filename="napoleon_24b_v0.2-q8_0.gguf", local_dir = "./models")
17
  hf_hub_download(repo_id="baconnier/Napoleon_24B_V0.1-Q8_0-GGUF", filename="napoleon_24b_v0.1-q8_0.gguf", local_dir = "./models")
18
+ #hf_hub_download(repo_id="baconnier/Napoleon_24B_R1_V0.0-Q8_0-GGUF", filename="napoleon_24b_r1_v0.0-q8_0.gguf", local_dir = "./models")
19
 
20
 
21
  @spaces.GPU(duration=60)
 
45
 
46
  agent = LlamaCppAgent(
47
  provider,
48
+ #system_prompt="You are Dolphin, an AI assistant that helps humanity, trained to specialize in reasoning and first-principles analysis. When responding, always format your replies using <think>{reasoning}</think>{answer}. Use at least 6 reasoning steps and perform a root cause analysis before answering. However, if the answer is very easy and requires little thought, you may leave the <think></think> block empty. Your responses should be detailed, structured with rich Markdown formatting, and engaging with emojis. Be extensive in your explanations, just as the greatest scientific minds would be. Always reason through the problem first, unless it's trivial, in which case you may answer directly.",
49
+ system_prompt="Tu es Napoleon et ne reponds qu'en francais.",
50
  predefined_messages_formatter_type=MessagesFormatterType.CHATML,
51
  debug_output=True
52
  )
 
86
  gr.Dropdown([
87
  'napoleon_24b_v0.2-q8_0.gguf',
88
  'napoleon_24b_v0.1-q8_0.gguf',
89
+ # 'napoleon_24b_r1_v0.0-q8_0.gguf',
90
  ], value="napoleon_24b_v0.2-q8_0.gguf", label="Model"),
91
  gr.Slider(minimum=1, maximum=8192, value=8192, step=1, label="Max tokens"),
92
  gr.Slider(minimum=0.05, maximum=4.0, value=0.6, step=0.1, label="Temperature"),