legacy107 commited on
Commit
7f29cd4
·
1 Parent(s): 51eb71a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -97,7 +97,7 @@ def generate_answer(question, context, ground, do_pretrained):
97
  ).input_ids
98
 
99
  # Decode the context back
100
- decoded_context = tokenizer.decode(input_ids, skip_special_tokens=True)[len(f"question: {question} context: "):]
101
 
102
  # Generate the answer
103
  with torch.no_grad():
 
97
  ).input_ids
98
 
99
  # Decode the context back
100
+ decoded_context = tokenizer.decode(input_ids[0], skip_special_tokens=True)[len(f"question: {question} context: "):]
101
 
102
  # Generate the answer
103
  with torch.no_grad():