KeivanR commited on
Commit
a2fd1a6
·
1 Parent(s): b637757

cuda check

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -67,7 +67,7 @@ async def load_model():
67
  login(token=hf_token)
68
 
69
  # Load model (will cache in /home/user/.cache/huggingface)
70
-
71
  model = QwenClassifier.from_pretrained(
72
  hf_repo,
73
  ).to(DEVICE)
 
67
  login(token=hf_token)
68
 
69
  # Load model (will cache in /home/user/.cache/huggingface)
70
+ DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
71
  model = QwenClassifier.from_pretrained(
72
  hf_repo,
73
  ).to(DEVICE)