Update app.py
Browse files
app.py
CHANGED
@@ -67,7 +67,7 @@ def generate_response(system_instruction, user_input):
|
|
67 |
with torch.no_grad():
|
68 |
generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True)
|
69 |
# Extract only the bot's response, omitting the prompt
|
70 |
-
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0].split("\n")[-2:]
|
71 |
|
72 |
return response
|
73 |
|
|
|
67 |
with torch.no_grad():
|
68 |
generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True)
|
69 |
# Extract only the bot's response, omitting the prompt
|
70 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0].split("\n")[-2:]
|
71 |
|
72 |
return response
|
73 |
|