yuxj commited on
Commit
e9ee22b
·
1 Parent(s): 111cb84
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -24,7 +24,7 @@ def chat_with_glm(input):
24
  return response
25
 
26
  def on_submit(input, history):
27
- global glm_history
28
  respond = "[" + time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + "]\n\n"
29
  if input == '--history':
30
  if len(history) > 0:
@@ -36,7 +36,7 @@ def on_submit(input, history):
36
  history.append((input, respond + history_str))
37
  elif input == '--clear':
38
  history = []
39
- glm_history = []
40
  else:
41
  history.append((input, respond + chat_with_glm(input)))
42
  return "", history
 
24
  return response
25
 
26
  def on_submit(input, history):
27
+ global glm_history
28
  respond = "[" + time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + "]\n\n"
29
  if input == '--history':
30
  if len(history) > 0:
 
36
  history.append((input, respond + history_str))
37
  elif input == '--clear':
38
  history = []
39
+ glm_history = []
40
  else:
41
  history.append((input, respond + chat_with_glm(input)))
42
  return "", history