kabbi commited on
Commit
5869f2f
·
verified ·
1 Parent(s): 5511411

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -46,7 +46,7 @@ def stream_chat(
46
  message: str,
47
  history: list,
48
  temperature: float = 0.3,
49
- max_new_tokens: int = 1024,
50
  top_p: float = 1.0,
51
  top_k: int = 20,
52
  penalty: float = 1.2,
@@ -54,7 +54,7 @@ def stream_chat(
54
  print(f'message: {message}')
55
  print(f'history: {history}')
56
 
57
- conversation = []
58
  for prompt, answer in history:
59
  conversation.extend([
60
  {"role": "user", "content": prompt},
@@ -112,7 +112,7 @@ with gr.Blocks(css=CSS, theme="soft") as demo:
112
  minimum=128,
113
  maximum=4096,
114
  step=1,
115
- value=1024,
116
  label="Max new tokens",
117
  render=False,
118
  ),
 
46
  message: str,
47
  history: list,
48
  temperature: float = 0.3,
49
+ max_new_tokens: int = 256,
50
  top_p: float = 1.0,
51
  top_k: int = 20,
52
  penalty: float = 1.2,
 
54
  print(f'message: {message}')
55
  print(f'history: {history}')
56
 
57
+ conversation = [{"role": "system", "content": "You are EXAONE model from LG AI Research, a helpful assistant."}]
58
  for prompt, answer in history:
59
  conversation.extend([
60
  {"role": "user", "content": prompt},
 
112
  minimum=128,
113
  maximum=4096,
114
  step=1,
115
+ value=256,
116
  label="Max new tokens",
117
  render=False,
118
  ),