Spaces:
Running
Running
yentinglin
commited on
Commit
•
94ed6bd
1
Parent(s):
ef219f6
Upload app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ with gr.Blocks() as demo:
|
|
31 |
prompt_tokens = tokenizer.encode(msg)
|
32 |
length_of_prompt = len(prompt_tokens)
|
33 |
if length_of_prompt > max_prompt_length:
|
34 |
-
msg = tokenizer.decode(prompt_tokens[-max_prompt_length:])
|
35 |
|
36 |
history[-1][1] = ""
|
37 |
for response in client.generate_stream(
|
|
|
31 |
prompt_tokens = tokenizer.encode(msg)
|
32 |
length_of_prompt = len(prompt_tokens)
|
33 |
if length_of_prompt > max_prompt_length:
|
34 |
+
msg = tokenizer.decode(prompt_tokens[-max_prompt_length-1:])
|
35 |
|
36 |
history[-1][1] = ""
|
37 |
for response in client.generate_stream(
|