Omnibus commited on
Commit
c91085d
1 Parent(s): ee3c61b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -70,7 +70,7 @@ def generate(prompt, history,max_new_tokens,health,temperature=temperature,top_p
70
  cnt+=len(l.split("\n"))
71
  print(f'cnt:: {cnt}')
72
  if cnt > MAX_HISTORY:
73
- history1 = compress_history(str(history), temperature, max_new_tokens, top_p, repetition_penalty)
74
  formatted_prompt = format_prompt(f"{GAME_MASTER.format(history=history1,stats=stats)}, {prompt}", history)
75
  stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
76
  output = ""
 
70
  cnt+=len(l.split("\n"))
71
  print(f'cnt:: {cnt}')
72
  if cnt > MAX_HISTORY:
73
+ history1 = compress_history(str(history), temperature, top_p, repetition_penalty)
74
  formatted_prompt = format_prompt(f"{GAME_MASTER.format(history=history1,stats=stats)}, {prompt}", history)
75
  stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
76
  output = ""