Spaces:
Running
on
L4
Running
on
L4
Update app.py
Browse files
app.py
CHANGED
@@ -98,7 +98,7 @@ DEFAULT_CONTENT = "Put your content sample here."
|
|
98 |
# Function to make predictions
|
99 |
def predict(content, policy):
|
100 |
input_text = PROMPT.format(policy=policy, content=content)
|
101 |
-
input_ids = tokenizer.encode(input_text, return_tensors="pt")
|
102 |
|
103 |
with torch.inference_mode():
|
104 |
outputs = model(input_ids)
|
|
|
98 |
# Function to make predictions
|
99 |
def predict(content, policy):
|
100 |
input_text = PROMPT.format(policy=policy, content=content)
|
101 |
+
input_ids = tokenizer.encode(input_text, return_tensors="pt").to(device)
|
102 |
|
103 |
with torch.inference_mode():
|
104 |
outputs = model(input_ids)
|