Rupnil commited on
Commit
60eb87b
1 Parent(s): 873f430

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,7 +11,7 @@ def format_prompt(message, history, prompt):
11
  return prompt
12
 
13
  def generate(
14
- prompt, history, prompt="", temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0,
15
  ):
16
  temperature = float(temperature)
17
  if temperature < 1e-2:
@@ -27,7 +27,7 @@ def generate(
27
  seed=42,
28
  )
29
 
30
- formatted_prompt = format_prompt(prompt, history, prompt)
31
 
32
  stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
33
  output = ""
@@ -38,7 +38,7 @@ def generate(
38
  return output
39
 
40
  additional_inputs=[
41
- gr.Textbox("", label="prompt"),
42
  gr.Slider(
43
  label="temperature",
44
  value=0.9,
 
11
  return prompt
12
 
13
  def generate(
14
+ prompt, history, system_prompt="", temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0,
15
  ):
16
  temperature = float(temperature)
17
  if temperature < 1e-2:
 
27
  seed=42,
28
  )
29
 
30
+ formatted_prompt = format_prompt(prompt, history, system_prompt)
31
 
32
  stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
33
  output = ""
 
38
  return output
39
 
40
  additional_inputs=[
41
+ gr.Textbox("", label="system_prompt"),
42
  gr.Slider(
43
  label="temperature",
44
  value=0.9,