Update factual/green_score/green.py
Browse files
factual/green_score/green.py
CHANGED
|
@@ -63,6 +63,7 @@ class GREEN:
|
|
| 63 |
module="transformers.tokenization_utils_base",
|
| 64 |
)
|
| 65 |
cpu = cpu or not torch.cuda.is_available()
|
|
|
|
| 66 |
self.cpu = cpu
|
| 67 |
self.model_name = model_name.split("/")[-1]
|
| 68 |
self.output_dir = output_dir
|
|
|
|
| 63 |
module="transformers.tokenization_utils_base",
|
| 64 |
)
|
| 65 |
cpu = cpu or not torch.cuda.is_available()
|
| 66 |
+
self.device = torch.device("cpu" if cpu else "cuda")
|
| 67 |
self.cpu = cpu
|
| 68 |
self.model_name = model_name.split("/")[-1]
|
| 69 |
self.output_dir = output_dir
|