Facemaker commited on
Commit
bf19ad6
·
1 Parent(s): 66ae2f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -7,9 +7,9 @@ client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
7
  def format_prompt(message, history, context):
8
  prompt = " "
9
  for user_prompt, bot_response in history:
10
- prompt += f"[INST] {user_prompt} [/{{
11
- prompt += f" {context}
12
- prompt += f"[INST] {message} [/
13
  return prompt
14
 
15
  def generate(
@@ -39,7 +39,6 @@ def generate(
39
  yield output
40
  return output
41
 
42
-
43
  mychatbot = gr.Chatbot(
44
  avatar_images=["./user.png", "./botm.png"], bubble_full_width=False, show_label=False, show_copy_button=True, likeable=True,)
45
 
@@ -50,4 +49,4 @@ demo = gr.ChatInterface(fn=generate,
50
  undo_btn=None
51
  )
52
 
53
- demo.queue().launch(show_api=True)
 
7
  def format_prompt(message, history, context):
8
  prompt = " "
9
  for user_prompt, bot_response in history:
10
+ prompt += f"[INST] {user_prompt} [/INST]"
11
+ prompt += f" {context} "
12
+ prompt += f"[INST] {message} [/INST]"
13
  return prompt
14
 
15
  def generate(
 
39
  yield output
40
  return output
41
 
 
42
  mychatbot = gr.Chatbot(
43
  avatar_images=["./user.png", "./botm.png"], bubble_full_width=False, show_label=False, show_copy_button=True, likeable=True,)
44
 
 
49
  undo_btn=None
50
  )
51
 
52
+ demo.queue().launch(show_api=True)