Spaces:
Sleeping
Sleeping
fix
Browse files
app.py
CHANGED
@@ -51,7 +51,10 @@ def ask(prompt):
|
|
51 |
outputs = model.generate(**input_ids, max_new_tokens=256)
|
52 |
|
53 |
print("Tokenizer decode process started")
|
54 |
-
answer = tokenizer.decode(outputs[0])
|
|
|
|
|
|
|
55 |
|
56 |
return answer
|
57 |
|
|
|
51 |
outputs = model.generate(**input_ids, max_new_tokens=256)
|
52 |
|
53 |
print("Tokenizer decode process started")
|
54 |
+
answer = tokenizer.decode(outputs[0])
|
55 |
+
print("Answer:", answer)
|
56 |
+
answer = answer.split("<end_of_turn>")[1].strip()
|
57 |
+
print("Final answer:", answer)
|
58 |
|
59 |
return answer
|
60 |
|