Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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,
|
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 = ""
|