yilunzhao commited on
Commit
7f523d7
1 Parent(s): 34cb0d4

Update app.py

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