Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ input_name = inf_session.get_inputs()[0].name
|
|
| 12 |
output_name = inf_session.get_outputs()[0].name
|
| 13 |
|
| 14 |
def classify(review):
|
| 15 |
-
input_ids = token(
|
| 16 |
logits = inf_session.run([output_name], {input_name: [input_ids]})[0]
|
| 17 |
logits = torch.FloatTensor(logits)
|
| 18 |
probs = torch.sigmoid(logits)[0]
|
|
|
|
| 12 |
output_name = inf_session.get_outputs()[0].name
|
| 13 |
|
| 14 |
def classify(review):
|
| 15 |
+
input_ids = token(review)['input_ids'][:512]
|
| 16 |
logits = inf_session.run([output_name], {input_name: [input_ids]})[0]
|
| 17 |
logits = torch.FloatTensor(logits)
|
| 18 |
probs = torch.sigmoid(logits)[0]
|