Spaces:
Sleeping
Sleeping
Changed line of code regarding translation device usage, cuda or cpu
Browse files- src/task_management.py +2 -2
src/task_management.py
CHANGED
@@ -68,8 +68,8 @@ class TaskManager:
|
|
68 |
)
|
69 |
|
70 |
# Check if CUDA is available and set the device
|
71 |
-
self.translation_device = (
|
72 |
-
"
|
73 |
)
|
74 |
|
75 |
# Load translation pipeline for model facebook/nllb-200-distilled-1.3B
|
|
|
68 |
)
|
69 |
|
70 |
# Check if CUDA is available and set the device
|
71 |
+
self.translation_device = torch.device(
|
72 |
+
"cuda" if torch.cuda.is_available() else "cpu"
|
73 |
)
|
74 |
|
75 |
# Load translation pipeline for model facebook/nllb-200-distilled-1.3B
|