Spaces:
Runtime error
Runtime error
Commit
Β·
481afa0
1
Parent(s):
7916def
Max Length
Browse files
README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: green
|
| 5 |
colorTo: blue
|
| 6 |
sdk: gradio
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Vera
|
| 3 |
+
emoji: ποΈ
|
| 4 |
colorFrom: green
|
| 5 |
colorTo: blue
|
| 6 |
sdk: gradio
|
app.py
CHANGED
|
@@ -57,7 +57,7 @@ class Interactive:
|
|
| 57 |
'score': 0.5,
|
| 58 |
'score_calibrated': 0.5,
|
| 59 |
}
|
| 60 |
-
input_ids = self.tokenizer.batch_encode_plus([statement], return_tensors='pt', padding='longest').input_ids.to(device)
|
| 61 |
with torch.no_grad():
|
| 62 |
output = self.model(input_ids)
|
| 63 |
last_hidden_state = output.last_hidden_state.to(device) # (B=1, L, D)
|
|
|
|
| 57 |
'score': 0.5,
|
| 58 |
'score_calibrated': 0.5,
|
| 59 |
}
|
| 60 |
+
input_ids = self.tokenizer.batch_encode_plus([statement], return_tensors='pt', padding='longest', truncation='longest_first', max_length=128).input_ids.to(device)
|
| 61 |
with torch.no_grad():
|
| 62 |
output = self.model(input_ids)
|
| 63 |
last_hidden_state = output.last_hidden_state.to(device) # (B=1, L, D)
|