BramVanroy commited on
Commit
2c74beb
1 Parent(s): 08e2fa8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -29,7 +29,7 @@ def generate(
29
  top_k: int = 40,
30
  repetition_penalty: float = 1.2,
31
  ) -> Iterator[str]:
32
- conversation = []
33
  for user, assistant in chat_history:
34
  conversation.extend([{"role": "user", "content": user}, {"role": "assistant", "content": assistant}])
35
  conversation.append({"role": "user", "content": message})
@@ -67,7 +67,6 @@ chat_interface = gr.ChatInterface(
67
  label="GEITje-ultra",
68
  show_share_button=True,
69
  avatar_images=(None, 'geitje-ultra-avatar.png')),
70
- # textbox=gr.Textbox(value="Typ een bericht…"),
71
  additional_inputs=[
72
  gr.Slider(
73
  label="Max new tokens",
@@ -81,14 +80,14 @@ chat_interface = gr.ChatInterface(
81
  minimum=0.05,
82
  maximum=2,
83
  step=0.05,
84
- value=1,
85
  ),
86
  gr.Slider(
87
  label="Top-p (nucleus sampling)",
88
  minimum=0.05,
89
  maximum=1.0,
90
  step=0.05,
91
- value=1.0,
92
  ),
93
  gr.Slider(
94
  label="Top-k",
 
29
  top_k: int = 40,
30
  repetition_penalty: float = 1.2,
31
  ) -> Iterator[str]:
32
+ conversation = [{"role": "system", "content": ""}]
33
  for user, assistant in chat_history:
34
  conversation.extend([{"role": "user", "content": user}, {"role": "assistant", "content": assistant}])
35
  conversation.append({"role": "user", "content": message})
 
67
  label="GEITje-ultra",
68
  show_share_button=True,
69
  avatar_images=(None, 'geitje-ultra-avatar.png')),
 
70
  additional_inputs=[
71
  gr.Slider(
72
  label="Max new tokens",
 
80
  minimum=0.05,
81
  maximum=2,
82
  step=0.05,
83
+ value=0.2,
84
  ),
85
  gr.Slider(
86
  label="Top-p (nucleus sampling)",
87
  minimum=0.05,
88
  maximum=1.0,
89
  step=0.05,
90
+ value=0.9,
91
  ),
92
  gr.Slider(
93
  label="Top-k",