Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,7 +61,7 @@ def generate_response(user_query, relevant_segment):
|
|
| 61 |
input_ids = tokenizer.encode(user_message, return_tensors='pt')
|
| 62 |
|
| 63 |
# Create attention mask (1 for real tokens, 0 for padding tokens)
|
| 64 |
-
attention_mask = (input_ids != tokenizer.pad_token_id).
|
| 65 |
|
| 66 |
# Generate the response using the model
|
| 67 |
output = model.generate(
|
|
|
|
| 61 |
input_ids = tokenizer.encode(user_message, return_tensors='pt')
|
| 62 |
|
| 63 |
# Create attention mask (1 for real tokens, 0 for padding tokens)
|
| 64 |
+
attention_mask = (input_ids != tokenizer.pad_token_id).long()
|
| 65 |
|
| 66 |
# Generate the response using the model
|
| 67 |
output = model.generate(
|