Hashintha commited on
Commit
8bc82b6
·
1 Parent(s): ef8cce5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -78,7 +78,7 @@ def refresh_file_display(state_dict: Dict) -> List[str]:
78
 
79
 
80
  def restart_ui(history: List) -> Tuple[List, Dict, Dict, Dict, Dict]:
81
- history.append(["Welcome to the chatbot!", ""])
82
  return (
83
  history,
84
  gr.Textbox.update(value="", interactive=False),
@@ -99,7 +99,7 @@ def bot(state_dict: Dict, history: List) -> List:
99
  while bot_backend.finish_reason in ('new_input', 'function_call'):
100
  if history[-1][0] is None:
101
  history.append(
102
- ['welcome', ""]
103
  )
104
  else:
105
  history[-1][1] = ""
 
78
 
79
 
80
  def restart_ui(history: List) -> Tuple[List, Dict, Dict, Dict, Dict]:
81
+ history.clear()
82
  return (
83
  history,
84
  gr.Textbox.update(value="", interactive=False),
 
99
  while bot_backend.finish_reason in ('new_input', 'function_call'):
100
  if history[-1][0] is None:
101
  history.append(
102
+ [None, ""]
103
  )
104
  else:
105
  history[-1][1] = ""