Spaces:
Runtime error
Runtime error
Jay Prajapati
commited on
Commit
·
94e805a
1
Parent(s):
c83027c
fix: Default CPU Usage
Browse files- src/model.py +1 -1
src/model.py
CHANGED
|
@@ -42,7 +42,7 @@ def get_safety_score(content, safety_policy):
|
|
| 42 |
correctly.
|
| 43 |
"""
|
| 44 |
|
| 45 |
-
inputs = tokenizer(prompt, return_tensors="pt").to("
|
| 46 |
with torch.no_grad():
|
| 47 |
logits = model(**inputs).logits
|
| 48 |
|
|
|
|
| 42 |
correctly.
|
| 43 |
"""
|
| 44 |
|
| 45 |
+
inputs = tokenizer(prompt, return_tensors="pt").to("cpu")
|
| 46 |
with torch.no_grad():
|
| 47 |
logits = model(**inputs).logits
|
| 48 |
|