Update app.py
Browse files
app.py
CHANGED
|
@@ -13,7 +13,7 @@ qa_classifier = pipeline(
|
|
| 13 |
paraphrase_model_name = 'tuner007/pegasus_paraphrase'
|
| 14 |
paraphrase_tokenizer = PegasusTokenizer.from_pretrained(paraphrase_model_name)
|
| 15 |
paraphrase_model = PegasusForConditionalGeneration.from_pretrained(paraphrase_model_name)
|
| 16 |
-
|
| 17 |
|
| 18 |
def find_answer_and_paraphrase(text_input, question):
|
| 19 |
# Find the answer
|
|
|
|
| 13 |
paraphrase_model_name = 'tuner007/pegasus_paraphrase'
|
| 14 |
paraphrase_tokenizer = PegasusTokenizer.from_pretrained(paraphrase_model_name)
|
| 15 |
paraphrase_model = PegasusForConditionalGeneration.from_pretrained(paraphrase_model_name)
|
| 16 |
+
torch_device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
| 17 |
|
| 18 |
def find_answer_and_paraphrase(text_input, question):
|
| 19 |
# Find the answer
|