mirror of
https://github.com/katanemo/plano.git
synced 2026-05-03 04:42:49 +02:00
fix precommit
This commit is contained in:
parent
953b1b056b
commit
b5d2f19d9b
4 changed files with 119 additions and 7 deletions
|
|
@ -5,13 +5,7 @@ import app.commons.globals as glb
|
|||
from app.loader import get_embedding_model, get_zero_shot_model, get_prompt_guard
|
||||
|
||||
# Mock constants
|
||||
if torch.cuda.is_available():
|
||||
DEVICE = "cuda"
|
||||
elif hasattr(torch.backends, "mps") and torch.backends.mps.is_available():
|
||||
DEVICE = "mps"
|
||||
else:
|
||||
DEVICE = "cpu"
|
||||
glb.DEVICE = DEVICE # Adjust as needed for your test case
|
||||
glb.DEVICE = "cuda" # Adjust as needed for your test case
|
||||
arch_guard_model_type = {
|
||||
"cpu": "katanemo/Arch-Guard-cpu",
|
||||
"cuda": "katanemo/Arch-Guard",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue