Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
|