Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -72,7 +72,7 @@ if st.button('Submit'):
|
|
72 |
ax = fig.add_axes([0,0,1,1])
|
73 |
labels_plot = ['Binnenland', 'Buitenland' ,'Cultuur & Media' ,'Economie' ,'Koningshuis',
|
74 |
'Opmerkelijk' ,'Politiek', 'Regionaal nieuws', 'Tech']
|
75 |
-
probs_plot = probabilities[0].cpu().detach().numpy()
|
76 |
|
77 |
ax.barh(labels_plot,probs_plot)
|
78 |
ax.set_title("Predicted article category probability")
|
@@ -80,7 +80,7 @@ if st.button('Submit'):
|
|
80 |
ax.set_ylabel("Predicted category")
|
81 |
st.pyplot(fig)
|
82 |
|
83 |
-
st.write('Category: {} | Probability: {:.1f}%'.format(number,(probs_plot[predictions])))
|
84 |
# output = genQuestion(option, input)
|
85 |
# print(output)
|
86 |
# st.write(output)
|
|
|
72 |
ax = fig.add_axes([0,0,1,1])
|
73 |
labels_plot = ['Binnenland', 'Buitenland' ,'Cultuur & Media' ,'Economie' ,'Koningshuis',
|
74 |
'Opmerkelijk' ,'Politiek', 'Regionaal nieuws', 'Tech']
|
75 |
+
probs_plot = probabilities[0].cpu().detach().numpy()*100
|
76 |
|
77 |
ax.barh(labels_plot,probs_plot)
|
78 |
ax.set_title("Predicted article category probability")
|
|
|
80 |
ax.set_ylabel("Predicted category")
|
81 |
st.pyplot(fig)
|
82 |
|
83 |
+
st.write('Category: {} | Probability: {:.1f}%'.format(number,(probs_plot[predictions])*100))
|
84 |
# output = genQuestion(option, input)
|
85 |
# print(output)
|
86 |
# st.write(output)
|