Update app.py
Browse files
app.py
CHANGED
@@ -162,8 +162,8 @@ def show_length_graph():
|
|
162 |
width = 0.35 # the width of the bars
|
163 |
|
164 |
fig, ax = plt.subplots(figsize=(14,8))
|
165 |
-
rects1 = ax.bar(x - width/2, original_length, width, color='lightgreen',zorder=0)
|
166 |
-
rects2 = ax.bar(x + width/2, summarized_length, width, color='lightblue',zorder=0)
|
167 |
|
168 |
rects3 = ax.bar(x - width/2, original_length, width, color='none',edgecolor='black', lw=1.25,zorder=1)
|
169 |
rects4 = ax.bar(x + width/2, summarized_length, width, color='none',edgecolor='black', lw=1.25,zorder=1)
|
@@ -173,7 +173,8 @@ def show_length_graph():
|
|
173 |
ax.set_xticks(x)
|
174 |
ax.set_yticks([i for i in range(0,max(original_length),max(summarized_length))])
|
175 |
ax.set_xticklabels(labels)
|
176 |
-
ax.set_xlabel('
|
|
|
177 |
|
178 |
plt.title('Original to Summarized Lengths in Space-Separated Tokens')
|
179 |
#ax.hist(arr, bins=20)
|
@@ -288,7 +289,7 @@ with st.form(key='columns_in_form'):
|
|
288 |
outdata = digestor.build_digest()
|
289 |
|
290 |
if len(digestor.text) == 0:
|
291 |
-
st.write("No text to return...
|
292 |
else:
|
293 |
st.subheader("Your digest:")
|
294 |
st.info(digestor.text)
|
|
|
162 |
width = 0.35 # the width of the bars
|
163 |
|
164 |
fig, ax = plt.subplots(figsize=(14,8))
|
165 |
+
rects1 = ax.bar(x - width/2, original_length, width, label='Original', color='lightgreen',zorder=0)
|
166 |
+
rects2 = ax.bar(x + width/2, summarized_length, width, label='Summary', color='lightblue',zorder=0)
|
167 |
|
168 |
rects3 = ax.bar(x - width/2, original_length, width, color='none',edgecolor='black', lw=1.25,zorder=1)
|
169 |
rects4 = ax.bar(x + width/2, summarized_length, width, color='none',edgecolor='black', lw=1.25,zorder=1)
|
|
|
173 |
ax.set_xticks(x)
|
174 |
ax.set_yticks([i for i in range(0,max(original_length),max(summarized_length))])
|
175 |
ax.set_xticklabels(labels)
|
176 |
+
ax.set_xlabel('Source article')
|
177 |
+
ax.legend(loc='upper right')
|
178 |
|
179 |
plt.title('Original to Summarized Lengths in Space-Separated Tokens')
|
180 |
#ax.hist(arr, bins=20)
|
|
|
289 |
outdata = digestor.build_digest()
|
290 |
|
291 |
if len(digestor.text) == 0:
|
292 |
+
st.write("No text to return...very sorry. Please hit 'refresh topics' in the options panel!")
|
293 |
else:
|
294 |
st.subheader("Your digest:")
|
295 |
st.info(digestor.text)
|