Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -28,14 +28,14 @@ def predict(message, history, max_tokens, temperature, top_p):
|
|
28 |
# Генерация ответа
|
29 |
outputs = model.generate(
|
30 |
input_ids=inputs,
|
31 |
-
max_new_tokens=256,
|
32 |
do_sample=True,
|
33 |
temperature=0.7,
|
34 |
top_p=0.95,
|
35 |
)
|
36 |
|
37 |
# Декодирование результата
|
38 |
-
response = tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True)
|
39 |
|
40 |
return response.strip()
|
41 |
|
|
|
28 |
# Генерация ответа
|
29 |
outputs = model.generate(
|
30 |
input_ids=inputs,
|
31 |
+
max_new_tokens=256,
|
32 |
do_sample=True,
|
33 |
temperature=0.7,
|
34 |
top_p=0.95,
|
35 |
)
|
36 |
|
37 |
# Декодирование результата
|
38 |
+
response = tokenizer.decode(outputs[0][len(inputs[0] + 9):], skip_special_tokens=True)
|
39 |
|
40 |
return response.strip()
|
41 |
|