Update app.py
Browse files
app.py
CHANGED
@@ -79,7 +79,7 @@ def generate_response(system_instruction, user_input):
|
|
79 |
with torch.no_grad():
|
80 |
generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True)
|
81 |
# Extract only the bot's response, omitting the prompt
|
82 |
-
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
83 |
|
84 |
return response
|
85 |
|
|
|
79 |
with torch.no_grad():
|
80 |
generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True)
|
81 |
# Extract only the bot's response, omitting the prompt
|
82 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0] #.split("\n")[-2:]
|
83 |
|
84 |
return response
|
85 |
|