Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -48,15 +48,13 @@ def predict(message, history, system_prompt, temperature, max_tokens):
|
|
48 |
temperature=0.5,
|
49 |
max_new_tokens=DEFAULT_MAX_NEW_TOKENS,
|
50 |
use_cache=True,
|
|
|
51 |
)
|
52 |
t = Thread(target=model.generate, kwargs=generate_kwargs)
|
53 |
t.start()
|
54 |
outputs = []
|
55 |
for text in streamer:
|
56 |
outputs.append(text)
|
57 |
-
if text in stop_tokens:
|
58 |
-
break
|
59 |
-
print(text)
|
60 |
yield "".join(outputs)
|
61 |
|
62 |
|
|
|
48 |
temperature=0.5,
|
49 |
max_new_tokens=DEFAULT_MAX_NEW_TOKENS,
|
50 |
use_cache=True,
|
51 |
+
eos_token_id=100278 # <|im_end|>
|
52 |
)
|
53 |
t = Thread(target=model.generate, kwargs=generate_kwargs)
|
54 |
t.start()
|
55 |
outputs = []
|
56 |
for text in streamer:
|
57 |
outputs.append(text)
|
|
|
|
|
|
|
58 |
yield "".join(outputs)
|
59 |
|
60 |
|