Spaces:
Runtime error
Runtime error
onkarsus13
commited on
Commit
•
7c53b26
1
Parent(s):
1dab9b8
Update app.py
Browse files
app.py
CHANGED
@@ -22,9 +22,6 @@ def infer(inps):
|
|
22 |
img = transform(img).unsqueeze(0)
|
23 |
|
24 |
logits = parseq(img)
|
25 |
-
# logits.shape # torch.Size([1, 26, 95]), 94 characters + [EOS] symbol
|
26 |
-
|
27 |
-
# Greedy decoding
|
28 |
pred = logits.softmax(-1)
|
29 |
label, confidence = parseq.tokenizer.decode(pred)
|
30 |
# print('Decoded label = {}'.format(label[0]))
|
|
|
22 |
img = transform(img).unsqueeze(0)
|
23 |
|
24 |
logits = parseq(img)
|
|
|
|
|
|
|
25 |
pred = logits.softmax(-1)
|
26 |
label, confidence = parseq.tokenizer.decode(pred)
|
27 |
# print('Decoded label = {}'.format(label[0]))
|