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