Hazzzardous commited on
Commit
2263e88
1 Parent(s): b644119

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -122,9 +122,10 @@ def chat(
122
  torch.cuda.empty_cache()
123
  model = get_model()
124
 
125
- if len(history[0]) == 0:
126
  # no history, so lets reset chat state
127
  model.resetState()
 
128
  else:
129
  model.setState(history[1])
130
  max_new_tokens = int(max_new_tokens)
 
122
  torch.cuda.empty_cache()
123
  model = get_model()
124
 
125
+ if len(history) == 0:
126
  # no history, so lets reset chat state
127
  model.resetState()
128
+ history = [[],model.emptyState]
129
  else:
130
  model.setState(history[1])
131
  max_new_tokens = int(max_new_tokens)