Omnibus commited on
Commit
4ee8aad
·
verified ·
1 Parent(s): 2dd3056

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -57,6 +57,7 @@ def generate(prompt, history,max_new_tokens,health,temperature=temperature,top_p
57
  #seed=42,
58
  )
59
  cnt=0
 
60
  history1=history
61
  '''
62
  stats="*******************\n"
@@ -72,7 +73,7 @@ def generate(prompt, history,max_new_tokens,health,temperature=temperature,top_p
72
  print(f'cnt:: {cnt}')
73
  if cnt > MAX_HISTORY:
74
  history1 = compress_history(str(history), temperature, top_p, repetition_penalty)
75
- formatted_prompt = format_prompt(f"{GAME_MASTER.format(history=history1,stats=health,dice=random.randint(1,100))}, {prompt}", history)
76
  stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
77
  output = ""
78
 
 
57
  #seed=42,
58
  )
59
  cnt=0
60
+ stats=health
61
  history1=history
62
  '''
63
  stats="*******************\n"
 
73
  print(f'cnt:: {cnt}')
74
  if cnt > MAX_HISTORY:
75
  history1 = compress_history(str(history), temperature, top_p, repetition_penalty)
76
+ formatted_prompt = format_prompt(f"{GAME_MASTER.format(history=history1,stats=stats,dice=random.randint(1,100))}, {prompt}", history)
77
  stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
78
  output = ""
79