Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -77,7 +77,7 @@ def generate(prompt, history,max_new_tokens,health,temperature=temperature,top_p
|
|
77 |
print(f'cnt:: {cnt}')
|
78 |
if cnt > MAX_HISTORY:
|
79 |
history1 = compress_history(str(history), temperature, top_p, repetition_penalty)
|
80 |
-
formatted_prompt = format_prompt(f"{GAME_MASTER.format(history=history1,stats=stats,dice=random.randint(1,
|
81 |
stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
82 |
output = ""
|
83 |
|
|
|
77 |
print(f'cnt:: {cnt}')
|
78 |
if cnt > MAX_HISTORY:
|
79 |
history1 = compress_history(str(history), temperature, top_p, repetition_penalty)
|
80 |
+
formatted_prompt = format_prompt(f"{GAME_MASTER.format(history=history1,stats=stats,dice=random.randint(1,10))}, {prompt}", history)
|
81 |
stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
82 |
output = ""
|
83 |
|