Update app.py
Browse files
app.py
CHANGED
@@ -71,6 +71,7 @@ from transformers import RagRetriever, RagSequenceForGeneration, AutoTokenizer
|
|
71 |
"""
|
72 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
73 |
"""
|
|
|
74 |
|
75 |
def strip_title(title):
|
76 |
if title.startswith('"'):
|
|
|
71 |
"""
|
72 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
73 |
"""
|
74 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "CPU")
|
75 |
|
76 |
def strip_title(title):
|
77 |
if title.startswith('"'):
|