yilunzhao commited on
Commit
5c4c078
1 Parent(s): ebe6532

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -17,7 +17,7 @@ else:
17
  def generate_response(passage: str, question: str) -> str:
18
  # Prepare the input text by combining the passage and question
19
  message = [f"Passage: {passage}\nQuestion: {question}"]
20
- inputs = tokenizer(message, return_tensors='pt', return_token_type_ids=False)
21
 
22
  response = model.generate(**inputs, max_new_tokens=100)
23
 
 
17
  def generate_response(passage: str, question: str) -> str:
18
  # Prepare the input text by combining the passage and question
19
  message = [f"Passage: {passage}\nQuestion: {question}"]
20
+ inputs = tokenizer(message, return_tensors='pt', return_token_type_ids=False).to('cuda')
21
 
22
  response = model.generate(**inputs, max_new_tokens=100)
23