wop commited on
Commit
4a6ece7
·
verified ·
1 Parent(s): a3c8a25

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -8
app.py CHANGED
@@ -24,14 +24,6 @@ def format_prompt(message, history):
24
  prompt += f"[INST] {message} [/INST]"
25
  return prompt
26
 
27
- def generate_initial_prompt():
28
- initial_prompt = format_prompt("", [])
29
- for output in generate(initial_prompt, []):
30
- print(output, end='')
31
-
32
- generate_initial_prompt() # Call the function to display initial greeting
33
-
34
-
35
  def generate(prompt, history, temperature=0.9, max_new_tokens=2048, top_p=0.95, repetition_penalty=1.0):
36
  temperature = float(temperature)
37
  if temperature < 1e-2:
@@ -57,6 +49,12 @@ def generate(prompt, history, temperature=0.9, max_new_tokens=2048, top_p=0.95,
57
  yield output
58
  return output
59
 
 
 
 
 
 
 
60
 
61
  customCSS = """
62
  #component-7 { # this is the default element ID of the chat component
 
24
  prompt += f"[INST] {message} [/INST]"
25
  return prompt
26
 
 
 
 
 
 
 
 
 
27
  def generate(prompt, history, temperature=0.9, max_new_tokens=2048, top_p=0.95, repetition_penalty=1.0):
28
  temperature = float(temperature)
29
  if temperature < 1e-2:
 
49
  yield output
50
  return output
51
 
52
+ def generate_initial_prompt():
53
+ initial_prompt = format_prompt("", [])
54
+ for output in generate(initial_prompt, []):
55
+ print(output, end='')
56
+
57
+ generate_initial_prompt() # Call the function to display initial greeting
58
 
59
  customCSS = """
60
  #component-7 { # this is the default element ID of the chat component