Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,7 @@ if st.button('Submit'):
|
|
66 |
encoding = tokenizer(text, return_tensors="pt")
|
67 |
outputs = model(**encoding)
|
68 |
predictions = outputs.logits.argmax(-1)
|
69 |
-
number = predictions.cpu().detach().numpy()
|
70 |
probabilities = torch.nn.functional.softmax(outputs.logits, dim=-1)
|
71 |
|
72 |
fig = plt.figure()
|
|
|
66 |
encoding = tokenizer(text, return_tensors="pt")
|
67 |
outputs = model(**encoding)
|
68 |
predictions = outputs.logits.argmax(-1)
|
69 |
+
number = predictions[0].cpu().detach().numpy()
|
70 |
probabilities = torch.nn.functional.softmax(outputs.logits, dim=-1)
|
71 |
|
72 |
fig = plt.figure()
|