vanessbut commited on
Commit
4607b11
·
1 Parent(s): a5c10d0

Добавлена гистограма.

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -82,7 +82,11 @@ if not text is None and len(text) > 0:
82
  fig, ax = plt.subplots()
83
  ax.set_title("Ключевые слова в порядке важности")
84
 
85
- ax.bar(keywords[:,0], keywords[:,1])
 
 
 
 
86
  st.pyplot(fig)
87
  else:
88
  st.markdown("Please, try to enter something.")
 
82
  fig, ax = plt.subplots()
83
  ax.set_title("Ключевые слова в порядке важности")
84
 
85
+ bar_width = 0.35
86
+ indexes = np.arange(heywords.shape[0])
87
+ ax.barh(indexes, keywords[:,1], bar_width)
88
+ plt.yticks(indexes, keywords[:,0])
89
+
90
  st.pyplot(fig)
91
  else:
92
  st.markdown("Please, try to enter something.")