Facemaker commited on
Commit
55f8f1a
·
1 Parent(s): 83b45a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
3
 
4
  client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
5
 
6
- def format_prompt(message, sys, history):
7
  prompt = "<s>"
8
  for user_prompt, bot_response in history:
9
  prompt += f"[INST] {user_prompt} [/INST]"
@@ -12,7 +12,7 @@ def format_prompt(message, sys, history):
12
  return prompt
13
 
14
  def generate(
15
- prompt, history, temperature=0.1, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0,
16
  ):
17
  temperature = float(temperature)
18
  if temperature < 1e-2:
@@ -44,7 +44,7 @@ mychatbot = gr.Chatbot(
44
 
45
  demo = gr.ChatInterface(fn=generate,
46
  chatbot=mychatbot,
47
- title="Facemaker Mixtral 8x7b Chat",
48
  retry_btn=None,
49
  undo_btn=None
50
  )
 
3
 
4
  client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
5
 
6
+ def format_prompt(message, history):
7
  prompt = "<s>"
8
  for user_prompt, bot_response in history:
9
  prompt += f"[INST] {user_prompt} [/INST]"
 
12
  return prompt
13
 
14
  def generate(
15
+ prompt, history, temperature=0.2, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0,
16
  ):
17
  temperature = float(temperature)
18
  if temperature < 1e-2:
 
44
 
45
  demo = gr.ChatInterface(fn=generate,
46
  chatbot=mychatbot,
47
+ title="Mixtral 8x7b Chat",
48
  retry_btn=None,
49
  undo_btn=None
50
  )