johannhartmann commited on
Commit
642b87c
Β·
verified Β·
1 Parent(s): 6ba879b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -10,7 +10,7 @@ chat_template = os.getenv('CHAT_TEMPLATE')
10
 
11
  # Interface variables
12
  model_name = model_id.split('/')[1].split('-GGUF')[0]
13
- title = f"πŸ‘‘ {model_name}"
14
  description = f"Chat with <a href=\"https://huggingface.co/{model_id}\">{model_name}</a> in GGUF format ({quant})!"
15
 
16
  # Initialize the LLM
@@ -30,7 +30,7 @@ def chat_stream_completion(message, history, system_prompt):
30
  response = llm.create_chat_completion(
31
  messages=messages_prompts,
32
  stream=True,
33
- stop=["[INST]"]
34
  )
35
  message_repl = ""
36
  for chunk in response:
@@ -43,11 +43,11 @@ gr.ChatInterface(
43
  fn=chat_stream_completion,
44
  title=title,
45
  description=description,
46
- additional_inputs=[gr.Textbox("You are helpful assistant.")],
47
  additional_inputs_accordion="πŸ“ System prompt",
48
  examples=[
49
- ["What is a Large Language Model?"],
50
- ["What's 9+2-1?"],
51
- ["Write Python code to print the Fibonacci sequence"]
52
  ]
53
  ).queue().launch(server_name="0.0.0.0")
 
10
 
11
  # Interface variables
12
  model_name = model_id.split('/')[1].split('-GGUF')[0]
13
+ title = f"πŸ‡©πŸ‡ͺ {model_name}"
14
  description = f"Chat with <a href=\"https://huggingface.co/{model_id}\">{model_name}</a> in GGUF format ({quant})!"
15
 
16
  # Initialize the LLM
 
30
  response = llm.create_chat_completion(
31
  messages=messages_prompts,
32
  stream=True,
33
+ stop=["<|im_end|>"]
34
  )
35
  message_repl = ""
36
  for chunk in response:
 
43
  fn=chat_stream_completion,
44
  title=title,
45
  description=description,
46
+ additional_inputs=[gr.Textbox("Du bist ein hilfreicher Assistent.")],
47
  additional_inputs_accordion="πŸ“ System prompt",
48
  examples=[
49
+ ["Was ist ein Large Language Model?"],
50
+ ["Was ist 9+2-1?"],
51
+ ["Schreibe Python code um die Fibonacci-Reihenfolge auszugeben."]
52
  ]
53
  ).queue().launch(server_name="0.0.0.0")