wop commited on
Commit
d32d01a
·
verified ·
1 Parent(s): f4ad520

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -16,6 +16,10 @@ def format_prompt(message, history):
16
  prompt += f"[INST] {message} [/INST]"
17
  return prompt
18
 
 
 
 
 
19
  def generate(prompt, history, temperature=0.9, max_new_tokens=2048, top_p=0.95, repetition_penalty=1.0):
20
  temperature = float(temperature)
21
  if temperature < 1e-2:
@@ -91,7 +95,7 @@ customCSS = """
91
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
92
  gr.ChatInterface(
93
  generate,
94
- placeholder="hello there BibleAI",
95
  additional_inputs=additional_inputs,
96
  )
97
 
 
16
  prompt += f"[INST] {message} [/INST]"
17
  return prompt
18
 
19
+ STARTER_HISTORY = [
20
+ ("hello there BibleAI", "Greetings! I am BibleAI, here to answer your questions about Christianity.")
21
+ ]
22
+
23
  def generate(prompt, history, temperature=0.9, max_new_tokens=2048, top_p=0.95, repetition_penalty=1.0):
24
  temperature = float(temperature)
25
  if temperature < 1e-2:
 
95
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
96
  gr.ChatInterface(
97
  generate,
98
+ history=STARTER_HISTORY,
99
  additional_inputs=additional_inputs,
100
  )
101