Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -43,9 +43,13 @@ encoding = tokenizer.encode(txt, return_tensors='pt')
|
|
43 |
result = model(encoding)
|
44 |
|
45 |
result
|
|
|
|
|
|
|
46 |
if (result.logits.size(dim=0) >= 2):
|
47 |
pad = (0, 1)
|
48 |
result = nn.functional.pad(result, pad, "constant", 0)
|
|
|
49 |
result
|
50 |
|
51 |
# transform logit to get probabilities
|
|
|
43 |
result = model(encoding)
|
44 |
|
45 |
result
|
46 |
+
result.logits.size()
|
47 |
+
result.logits.size(dim=0)
|
48 |
+
|
49 |
if (result.logits.size(dim=0) >= 2):
|
50 |
pad = (0, 1)
|
51 |
result = nn.functional.pad(result, pad, "constant", 0)
|
52 |
+
|
53 |
result
|
54 |
|
55 |
# transform logit to get probabilities
|